MCPcopy
hub / github.com/npm/node-semver / parseAndFreezeSemVerObject

Function parseAndFreezeSemVerObject

test/functions/truncate.js:11–15  ·  view source on GitHub ↗
(version)

Source from the content-addressed store, hash-verified

9// Freezing SemVer object inputs to truncate ensures that the truncate function
10// does not mutate them
11const parseAndFreezeSemVerObject = (version) => {
12 const parsed = parse(version)
13 Object.freeze(parsed)
14 return parsed
15}
16
17test('truncate fixture versions test', (t) => {
18 truncations.forEach(([pre, truncation, expected]) => {

Callers 1

truncate.jsFile · 0.85

Calls 1

parseFunction · 0.85

Tested by

no test coverage detected