MCPcopy
hub / github.com/vitejs/vite / sortLicenses

Function sortLicenses

packages/vite/rollupLicensePlugin.ts:136–149  ·  view source on GitHub ↗
(licenses: Set<string>)

Source from the content-addressed store, hash-verified

134}
135
136function sortLicenses(licenses: Set<string>) {
137 let withParenthesis: string[] = []
138 let noParenthesis: string[] = []
139 licenses.forEach((license) => {
140 if (license[0] === '(') {
141 withParenthesis.push(license)
142 } else {
143 noParenthesis.push(license)
144 }
145 })
146 withParenthesis = withParenthesis.sort()
147 noParenthesis = noParenthesis.sort()
148 return [...noParenthesis, ...withParenthesis]
149}
150
151interface DependencyInfo {
152 license?: string

Callers 1

thirdPartyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected