MCPcopy
hub / github.com/vitest-dev/vitest / sortLicenses

Function sortLicenses

packages/vitest/rollup.config.js:277–291  ·  view source on GitHub ↗
(licenses)

Source from the content-addressed store, hash-verified

275}
276
277function sortLicenses(licenses) {
278 let withParenthesis = []
279 let noParenthesis = []
280 licenses.forEach((license) => {
281 if (/^\(/.test(license)) {
282 withParenthesis.push(license)
283 }
284 else {
285 noParenthesis.push(license)
286 }
287 })
288 withParenthesis = withParenthesis.sort()
289 noParenthesis = noParenthesis.sort()
290 return [...noParenthesis, ...withParenthesis]
291}

Callers 1

thirdPartyFunction · 0.85

Calls 2

testMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected