MCPcopy
hub / github.com/formatjs/formatjs / sortedUnique

Function sortedUnique

tools/generate-package-json.ts:51–53  ·  view source on GitHub ↗
(values: string[] | undefined)

Source from the content-addressed store, hash-verified

49const REPOSITORY_SORT_FIRST = ['type', 'url', 'directory']
50
51function sortedUnique(values: string[] | undefined): string[] {
52 return [...new Set(values ?? [])].sort((a, b) => (a < b ? -1 : a > b ? 1 : 0))
53}
54
55function rootVersionMap(rootPackageJson: JsonObject): Map<string, string> {
56 const versions = new Map<string, string>()

Callers 1

dependencyObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected