Home / Function/ sortLicenses() — vite Function Reference

sortLicenses() — vite Function Reference

Architecture documentation for the sortLicenses() function in rollupLicensePlugin.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  4cea9080_1c4b_baeb_7923_fa9e862e8153["sortLicenses()"]
  8c8944ff_c444_0ebb_8419_eb691db97f08["rollupLicensePlugin.ts"]
  4cea9080_1c4b_baeb_7923_fa9e862e8153 -->|defined in| 8c8944ff_c444_0ebb_8419_eb691db97f08
  74b9093c_e915_858a_5cf5_38f75501fe67["licensePlugin()"]
  74b9093c_e915_858a_5cf5_38f75501fe67 -->|calls| 4cea9080_1c4b_baeb_7923_fa9e862e8153
  style 4cea9080_1c4b_baeb_7923_fa9e862e8153 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/rollupLicensePlugin.ts lines 135–148

function sortLicenses(licenses: Set<string>) {
  let withParenthesis: string[] = []
  let noParenthesis: string[] = []
  licenses.forEach((license) => {
    if (license[0] === '(') {
      withParenthesis.push(license)
    } else {
      noParenthesis.push(license)
    }
  })
  withParenthesis = withParenthesis.sort()
  noParenthesis = noParenthesis.sort()
  return [...noParenthesis, ...withParenthesis]
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does sortLicenses() do?
sortLicenses() is a function in the vite codebase, defined in packages/vite/rollupLicensePlugin.ts.
Where is sortLicenses() defined?
sortLicenses() is defined in packages/vite/rollupLicensePlugin.ts at line 135.
What calls sortLicenses()?
sortLicenses() is called by 1 function(s): licensePlugin.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free