MCPcopy
hub / github.com/webpack/webpack / negate

Function negate

lib/util/semver.js:178–180  ·  view source on GitHub ↗
(range)

Source from the content-addressed store, hash-verified

176 * @returns {SemVerRangeItem[]} result
177 */
178 const negate = (range) => {
179 return [-(/** @type { [number]} */ (range)[0]) - 1, ...range.slice(1)];
180 };
181
182 /**
183 * Returns the sem ver range.

Callers 2

parseSimpleFunction · 0.85
parseRangeFunction · 0.85

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected