Type Aliases
Bugs
type Bugs = | string | { email: string url: string }Defined in: index.ts:398
ConditionalValue
type ConditionalValue = | ConditionalValue[] | ConditionalValueObject | string | nullDefined in: index.ts:58
ConditionalValueObject
type ConditionalValueObject = objectDefined in: index.ts:54
Index Signature
[k: string]: ConditionalValueDependencySaveType
type DependencySaveType = DependencyTypeShort | 'implicit'Defined in: index.ts:1372
Unique keys that indicate how a new or updated dependency should be saved back to a manifest.
'implicit' is used to indicate that a dependency should be saved as
whatever type it already exists as. If the dependency does not exist,
then 'implicit' is equivalent to 'prod', as that is the default
save type.
DependencyTypeLong
type DependencyTypeLong = | 'dependencies' | 'devDependencies' | 'optionalDependencies' | 'peerDependencies'Defined in: index.ts:1347
Name of the package.json keys used to define different types of dependencies.
DependencyTypeShort
type DependencyTypeShort = | 'dev' | 'optional' | 'peer' | 'peerOptional' | 'prod'Defined in: index.ts:1356
Unique keys that define different types of dependencies relationship.
Dist
type Dist = objectDefined in: index.ts:35
The Manifest[‘dist’] field present in registry manifests
Type declaration
fileCount?
optional fileCount: number;integrity?
optional integrity: Integrity;shasum?
optional shasum: string;signatures?
optional signatures: object[];tarball?
optional tarball: string;unpackedSize?
optional unpackedSize: number;EdgeLike
type EdgeLike = objectDefined in: index.ts:1411
Type declaration
from
from: NodeLikename
name: stringoptional?
optional optional: boolean;peer?
optional peer: boolean;spec
spec: SpecLikeBaseto?
optional to: NodeLike;type
type: DependencyTypeShortExports
type Exports = Exclude<ConditionalValue, null> | ExportsSubpathsDefined in: index.ts:68
ExportsSubpaths
type ExportsSubpaths = { [path in '.' | `./${string}`]?: ConditionalValue}Defined in: index.ts:64
Funding
type Funding = FundingEntry | FundingEntry[]Defined in: index.ts:77
FundingEntry
type FundingEntry = | string | { [key: string]: JSONField type: string url: string }Defined in: index.ts:74
GraphLike
type GraphLike = objectDefined in: index.ts:1421
Type declaration
addEdge()
addEdge: (type, spec, from, to?) => EdgeLikeParameters
type
spec
from
to?
Returns
addNode()
addNode: (id?, manifest?, spec?, name?, version?) => NodeLikeParameters
id?
manifest?
spec?
name?
string
version?
string
Returns
edges
edges: Set<EdgeLike>importers
importers: Set<NodeLike>mainImporter
mainImporter: NodeLikenodes
nodes: Map<DepID, NodeLike>nodesByName
nodesByName: Map<string, Set<NodeLike>>projectRoot
projectRoot: stringremoveNode()
Parameters
node
replacement?
keepEdges?
boolean
Returns
void
Imports
type Imports = Record<`#${string}`, ConditionalValue>Defined in: index.ts:72
Integrity
type Integrity = `sha512-${string}`Defined in: index.ts:29
sha512 SRI string
JSONField
type JSONField = | JSONField[] | boolean | number | string | {} | null | undefinedDefined in: index.ts:19
anything that can be encoded in JSON
KeyID
type KeyID = `SHA256:${string}`Defined in: index.ts:32
SHA256 key identifier
Keywords
type Keywords = string[] | stringDefined in: index.ts:405
Manifest
type Manifest = objectDefined in: index.ts:729
Type declaration
acceptDependencies?
optional acceptDependencies: Record<string, string>;dependency ranges that are acceptable, but not forced
author?
optional author: Person;the author of a package
bin?
optional bin: Record<string, string> | string;executable built and linked by this package
bugs?
optional bugs: Bugs;where to go to file issues
bundleDependencies?
optional bundleDependencies: string[];names of dependencies included in the package tarball
contributors?
optional contributors: Person[];contributors to the package
cpu?
optional cpu: string[] | string;supported CPU architectures this package can run on
dependencies?
optional dependencies: Record<string, string>;production dependencies, name:specifier
deprecated?
optional deprecated: string;a message indicating that this is not to be used
description?
optional description: string;a short description of the package
devDependencies?
optional devDependencies: Record<string, string>;development dependencies, name:specifier
dist?
optional dist: Dist;Only present in Manifests served by a registry. Contains information about the artifact served for this package release.
engines?
optional engines: Record<string, string>;supported run-time platforms this package can run on
exports?
optional exports: Exports;named subpath exports
funding?
optional funding: Funding;URLs that can be visited to fund this project
gitHead?
optional gitHead: string;the HEAD of the git repo this was published from only present in published packages
gypfile?
optional gypfile: boolean;npm puts this on published manifests
homepage?
optional homepage: string;The homepage of the repository
imports?
optional imports: Imports;named #identifier imports
keywords?
optional keywords: Keywords;search keywords
license?
optional license: string;the license of the package
main?
optional main: string;the main module, if exports[’.’] is not set
name?
optional name: string;The name of the package. optional because {} is a valid package.json
optionalDependencies?
optional optionalDependencies: Record<string, string>;optional dependencies, name:specifier
os?
optional os: string[] | string;supported operating systems this package can run on
peerDependencies?
optional peerDependencies: Record<string, string>;peer dependencies, name:specifier
peerDependenciesMeta?
optional peerDependenciesMeta: Record<string, PeerDependenciesMetaValue>;peer dependencies marked as optional
private?
optional private: boolean;whether the package is private
repository?
optional repository: Repository;where the development happens
scripts?
optional scripts: Record<string, string>;run-script actions for this package
type?
optional type: "commonjs" | "module";whether this is ESM or CommonJS by default
version?
optional version: string;The version of the package. optional because {} is a valid package.json
ManifestRegistry
type ManifestRegistry = Manifest & Required<Pick<Manifest, 'name' | 'version' | 'dist'>> & objectDefined in: index.ts:832
A specific type of Manifest that represents manifests
that were retrieved from a registry, these will always have name,
version and dist information along with an optional maintainers
field.
Type declaration
maintainers?
optional maintainers: unknown;NodeLike
type NodeLike = objectDefined in: index.ts:1448
Type declaration
bins?
optional bins: Record<string, string>;buildAllowed?
optional buildAllowed: boolean;buildBlocked?
optional buildBlocked: boolean;buildState?
optional buildState: "none" | "needed" | "built" | "failed";confused
confused: booleandev
dev: booleanedgesIn
edgesIn: Set<EdgeLike>edgesOut
edgesOut: Map<string, EdgeLike>graph
graph: GraphLikeid
id: DepIDimporter
importer: booleanintegrity?
optional integrity: string | null;location?
optional location: string;mainImporter
mainImporter: booleanmanifest?
optional manifest: NormalizedManifest | null;modifier?
optional modifier: string;name?
optional name: string | null;optional
optional: booleanoptions
options: SpecOptionsplatform?
optional platform: object;platform.cpu?
optional platform.cpu: string[] | string;platform.engines?
optional platform.engines: Record<string, string>;platform.os?
optional platform.os: string[] | string;projectRoot
projectRoot: stringrawManifest?
optional rawManifest: NormalizedManifest | null;registry?
optional registry: string;resolved?
optional resolved: string | null;toJSON()
toJSON: () => Pick< NodeLike, | 'id' | 'name' | 'version' | 'location' | 'importer' | 'manifest' | 'projectRoot' | 'integrity' | 'resolved' | 'dev' | 'optional' | 'confused' | 'platform' | 'buildState' | 'buildAllowed' | 'buildBlocked' > & objectReturns
Pick<NodeLike, | "id" | "name" | "version"
| "location" | "importer" | "manifest" | "projectRoot" |
"integrity" | "resolved" | "dev" | "optional" |
"confused" | "platform" | "buildState" | "buildAllowed" |
"buildBlocked"> & object
version?
optional version: string | null;workspaces
workspaces: Map<string, EdgeLike> | undefinedmaybeSetConfusedManifest()
Parameters
spec
confused?
Override<Manifest,
NormalizedFields>
Returns
void
setConfusedManifest()
Parameters
fixed
confused?
Override<Manifest,
NormalizedFields>
Returns
void
setResolved()
Returns
void
toString()
Returns
string
NormalizedBin
type NormalizedBin = Record<string, string>Defined in: index.ts:444
Normalized bin - always a record of string to string
NormalizedBugs
type NormalizedBugs = NormalizedBugsEntry[]Defined in: index.ts:439
Normalized bugs - always an array of NormalizedBugsEntry
NormalizedBugsEntry
type NormalizedBugsEntry = objectDefined in: index.ts:410
Normalized bugs entry - always an object with type and url/email
Type declaration
email?
optional email: string;type?
optional type: "email" | "link";url?
optional url: string;NormalizedContributorEntry
type NormalizedContributorEntry = objectDefined in: index.ts:283
Represents a normalized contributor object. This is the type that is used in the NormalizedManifest and NormalizedManifestRegistry objects.
Type declaration
[kIsPublisher]?
optional [kIsPublisher]: boolean;[kWriteAccess]?
optional [kWriteAccess]: boolean;email?
optional email: string;isPublisher?
optional isPublisher: boolean;name?
optional name: string;writeAccess?
optional writeAccess: boolean;NormalizedContributors
type NormalizedContributors = NormalizedContributorEntry[]Defined in: index.ts:276
Normalized contributors - always an array of NormalizedContributorEntry.
NormalizedCpu
type NormalizedCpu = string[]Defined in: index.ts:434
Normalized CPU list - always an array of strings
NormalizedEngines
type NormalizedEngines = Record<string, string>Defined in: index.ts:424
Normalized engines - always a record of string to string
NormalizedFields
type NormalizedFields = objectDefined in: index.ts:802
Type declaration
author
author: | NormalizedContributorEntry | undefined;bin
bin: NormalizedBin | undefinedbugs
bugs: NormalizedBugs | undefinedcontributors
contributors: | NormalizedContributors | undefined;cpu
cpu: NormalizedCpu | undefinedengines
engines: NormalizedEngines | undefinedfunding
funding: NormalizedFunding | undefinedkeywords
keywords: NormalizedKeywords | undefinedos
os: NormalizedOs | undefinedNormalizedFunding
type NormalizedFunding = NormalizedFundingEntry[]Defined in: index.ts:91
Normalized funding information, an array of NormalizedFundingEntry.
NormalizedFundingEntry
type NormalizedFundingEntry = objectDefined in: index.ts:82
An object with url and optional additional properties
Type declaration
Index Signature
[key: string]: JSONFieldtype?
optional type: string;url
url: stringNormalizedKeywords
type NormalizedKeywords = string[]Defined in: index.ts:419
Normalized keywords - always an array of strings
NormalizedManifest
type NormalizedManifest = Override<Manifest, NormalizedFields>Defined in: index.ts:817
A Manifest object that contains normalized fields.
NormalizedManifestRegistry
type NormalizedManifestRegistry = Override< ManifestRegistry, NormalizedFields>Defined in: index.ts:822
A ManifestRegistry object that contains normalized fields.
NormalizedOs
type NormalizedOs = string[]Defined in: index.ts:429
Normalized OS list - always an array of strings
Override<T, R>
type Override<T, R> = { [K in keyof T]: K extends keyof R ? R[K] : T[K]}Defined in: index.ts:11
Utility type that overrides specific properties of type T with new types from R. Constrains override values to exclude undefined, ensuring that normalization cannot introduce undefined to fields that shouldn’t have it.
Type Parameters
• T
• R extends
{ [K in keyof R]: R[K] extends undefined ? never : R[K] }
Packument
type Packument = objectDefined in: index.ts:851
A document that represents available package versions in a given
registry along with extra information, such as dist-tags and
maintainers info. The versions field is key-value structure in
which keys are the available versions of a given package and values
are ManifestRegistry objects.
Type declaration
contributors?
optional contributors: Person[];dist-tags
dist-tags: Record<string, string>;maintainers?
optional maintainers: Person[];modified?
optional modified: string;name
name: stringreadme?
optional readme: string;time?
optional time: Record<string, string>;versions
versions: Record<string, Manifest>PeerDependenciesMetaValue
type PeerDependenciesMetaValue = objectDefined in: index.ts:48
An object used to mark some peerDeps as optional
Type declaration
optional?
optional optional: boolean;Person
type Person = | string | { email: string name: string url: string }Defined in: index.ts:383
RefType
type RefType = 'branch' | 'head' | 'other' | 'pull' | 'tag'Defined in: index.ts:862
Repository
type Repository = | string | { type: string url: string }Defined in: index.ts:391
RevDoc
type RevDoc = Omit<Packument, 'versions'> & objectDefined in: index.ts:882
An object kind of resembling a packument, but about a git repo.
Type declaration
refs
refs: Record<string, RevDocEntry>all named things that can be cloned down remotely
shas
shas: Record<string, string[]>all named shas referenced above
versions
versions: Record<string, RevDocEntry>all semver-looking tags go in this record
RevDocEntry
type RevDocEntry = Omit<Manifest, 'type'> & Required<Pick<Manifest, 'version'>> & objectDefined in: index.ts:867
A representation of a given remote ref in a RevDoc object.
Type declaration
rawRef
rawRef: stringcanonical full ref, like refs/tags/blahblah
ref
ref: stringref as passed git locally
sha
sha: stringsha this references
type
type: RefTypewhat type of ref this is: ‘branch’, ‘tag’, etc.
SomeNormalizedManifest<T>
type SomeNormalizedManifest<T> = T extends ManifestRegistry ? NormalizedManifestRegistry : NormalizedManifestDefined in: index.ts:840
Maps the manifest type to the equivalent normalized manifest type.
Type Parameters
• T
Variables
dependencyTypes
const dependencyTypes: Map<DependencyTypeLong, DependencyTypeShort>Defined in: index.ts:1400
Maps between long form names usually used in package.json files to a
corresponding short form name, used in lockfiles.
integrityRE
const integrityRE: RegExpDefined in: index.ts:897
keyIDRE
const keyIDRE: RegExpDefined in: index.ts:921
longDependencyTypes
const longDependencyTypes: Set<DependencyTypeLong>Defined in: index.ts:1378
A set of the possible long dependency type names, as used in
package.json files.
shortDependencyTypes
const shortDependencyTypes: Set<DependencyTypeShort>Defined in: index.ts:1388
A set of the short type keys used to represent dependency relationships.
Functions
asError()
function asError(er, fallbackMessage): ErrorDefined in: index.ts:946
Convert an unknown value to an error.
Parameters
er
unknown
fallbackMessage
string = 'Unknown error'
Returns
Error
asIntegrity()
function asIntegrity(i): `sha512-${string}`Defined in: index.ts:901
Parameters
i
unknown
Returns
`sha512-${string}`
asKeyID()
function asKeyID(k): `SHA256:${string}`Defined in: index.ts:925
Parameters
k
unknown
Returns
`SHA256:${string}`
asManifest()
function asManifest(m, from?): ManifestDefined in: index.ts:1077
Given an unknown value, convert it to a Manifest.
Parameters
m
unknown
from?
(…a) => any
Returns
asManifestRegistry()
function asManifestRegistry(m, from?): ManifestRegistryDefined in: index.ts:1226
Given an unknown value, convert it to a ManifestRegistry.
Parameters
m
unknown
from?
(…a) => any
Returns
asNormalizedManifest()
function asNormalizedManifest(m, from?): OverrideDefined in: index.ts:1209
Given an unknown value, convert it to a NormalizedManifest.
Parameters
m
unknown
from?
(…a) => any
Returns
asNormalizedManifestRegistry()
function asNormalizedManifestRegistry(m, from?): OverrideDefined in: index.ts:1252
Given an unknown value, convert it to a NormalizedManifestRegistry.
Parameters
m
unknown
from?
(…a) => any
Returns
asPackument()
function asPackument(p, from?): PackumentDefined in: index.ts:1324
Parameters
p
unknown
from?
(…a) => any
Returns
assertIntegrity()
function assertIntegrity(i): asserts i is `sha512-${string}`Defined in: index.ts:915
Parameters
i
unknown
Returns
asserts i is `sha512-${string}`
assertKeyID()
function assertKeyID(k): asserts k is `SHA256:${string}`Defined in: index.ts:939
Parameters
k
unknown
Returns
asserts k is `SHA256:${string}`
assertManifest()
function assertManifest(m): asserts m is ManifestDefined in: index.ts:1302
Parameters
m
unknown
Returns
asserts m is Manifest
assertManifestRegistry()
function assertManifestRegistry(m): asserts m is ManifestRegistryDefined in: index.ts:1307
Parameters
m
unknown
Returns
asserts m is ManifestRegistry
assertPackument()
function assertPackument(m): asserts m is PackumentDefined in: index.ts:1338
Parameters
m
unknown
Returns
asserts m is Packument
assertRecordStringString()
function assertRecordStringString(o): voidDefined in: index.ts:984
Parameters
o
unknown
Returns
void
assertRecordStringT()
function assertRecordStringT<T>( o, check, wanted,): asserts o is Record<string, T>Defined in: index.ts:1002
Type Parameters
• T
Parameters
o
unknown
check
(o) => o is T
wanted
string
Returns
asserts o is Record<string, T>
expandNormalizedManifestSymbols()
function expandNormalizedManifestSymbols(m): OverrideDefined in: index.ts:1284
Walks a normalized manifest and expands any symbols found in the
author and contributors fields.
Parameters
m
Returns
fixManifestVersion()
function fixManifestVersion<T>(manifest): TDefined in: index.ts:205
Given a version Normalize the version field in a manifest.
Type Parameters
• T extends | Manifest |
ManifestRegistry
Parameters
manifest
T
Returns
T
isBoolean()
function isBoolean(value): value is booleanDefined in: index.ts:894
A type guard to check if a value is a boolean.
Parameters
value
unknown
Returns
value is boolean
isError()
function isError(er): er is ErrorDefined in: index.ts:955
Check if a value is an error.
Parameters
er
unknown
Returns
er is Error
isErrorWithCause()
function isErrorWithCause(er): er is Error & { cause: unknown }Defined in: index.ts:961
Check if an error has a cause property.
Parameters
er
unknown
Returns
er is Error & { cause: unknown }
isIntegrity()
function isIntegrity(i): i is `sha512-${string}`Defined in: index.ts:898
Parameters
i
unknown
Returns
i is `sha512-${string}`
isKeyID()
function isKeyID(k): k is `SHA256:${string}`Defined in: index.ts:922
Parameters
k
unknown
Returns
k is `SHA256:${string}`
isManifest()
function isManifest(m): m is ManifestDefined in: index.ts:1051
Is a given unknown value a valid Manifest object? Returns
true if so.
Parameters
m
unknown
Returns
m is Manifest
isManifestRegistry()
function isManifestRegistry(m): m is ManifestRegistryDefined in: index.ts:1069
A specific Manifest that is retrieved uniquely from
reading registry packument and manifest endpoints, it has dist,
name and version fields defined.
Parameters
m
unknown
Returns
m is ManifestRegistry
isNormalizedBugs()
function isNormalizedBugs(o): o is NormalizedBugsDefined in: index.ts:528
Type guard to check if a value is a NormalizedBugs.
Parameters
o
unknown
Returns
o is NormalizedBugs
isNormalizedBugsEntry()
function isNormalizedBugsEntry(o): o is NormalizedBugsEntryDefined in: index.ts:512
Type guard to check if a value is a NormalizedBugsEntry.
Parameters
o
unknown
Returns
o is NormalizedBugsEntry
isNormalizedContributorEntry()
function isNormalizedContributorEntry( o,): o is NormalizedContributorEntryDefined in: index.ts:299
Type guard to check if a value is a normalized contributor entry.
Parameters
o
unknown
Returns
o is NormalizedContributorEntry
isNormalizedContributors()
function isNormalizedContributors(o): o is NormalizedContributorsDefined in: index.ts:318
Type guard to check if a value is a NormalizedContributors.
Parameters
o
unknown
Returns
o is NormalizedContributors
isNormalizedCpu()
function isNormalizedCpu(o): o is NormalizedCpuDefined in: index.ts:697
Type guard to check if a value is a NormalizedCpu.
Parameters
o
unknown
Returns
o is NormalizedCpu
isNormalizedEngines()
function isNormalizedEngines(o): o is NormalizedEnginesDefined in: index.ts:671
Type guard to check if a value is a NormalizedEngines.
Parameters
o
unknown
Returns
o is NormalizedEngines
isNormalizedFunding()
function isNormalizedFunding(o): o is NormalizedFundingDefined in: index.ts:192
Type guard to check if a value is a NormalizedFunding.
Parameters
o
unknown
Returns
o is NormalizedFunding
isNormalizedFundingEntry()
function isNormalizedFundingEntry(o): o is NormalizedFundingEntryDefined in: index.ts:173
Type guard to check if a value is a NormalizedFundingEntry.
Parameters
o
unknown
Returns
o is NormalizedFundingEntry
isNormalizedKeywords()
function isNormalizedKeywords(o): o is NormalizedKeywordsDefined in: index.ts:573
Type guard to check if a value is a NormalizedKeywords.
Parameters
o
unknown
Returns
o is NormalizedKeywords
isNormalizedManifest()
function isNormalizedManifest( o,): o is Override<Manifest, NormalizedFields>Defined in: index.ts:1186
Type guard to check if a value is a NormalizedManifest.
Parameters
o
unknown
Returns
o is Override<Manifest, NormalizedFields>
isNormalizedManifestRegistry()
function isNormalizedManifestRegistry( o,): o is Override<ManifestRegistry, NormalizedFields>Defined in: index.ts:1243
Type guard to check if a value is a NormalizedManifestRegistry.
Parameters
o
unknown
Returns
o is Override<ManifestRegistry, NormalizedFields>
isNormalizedOs()
function isNormalizedOs(o): o is NormalizedOsDefined in: index.ts:680
Type guard to check if a value is a NormalizedOs.
Parameters
o
unknown
Returns
o is NormalizedOs
isObject()
function isObject(v): v is Record<string, unknown>Defined in: index.ts:968
Check if an unknown value is a plain object.
Parameters
v
unknown
Returns
v is Record<string, unknown>
isPackument()
function isPackument(p): p is PackumentDefined in: index.ts:1313
Parameters
p
unknown
Returns
p is Packument
isPeerDependenciesMetaValue()
function isPeerDependenciesMetaValue( o,): o is PeerDependenciesMetaValueDefined in: index.ts:1036
Parameters
o
unknown
Returns
o is PeerDependenciesMetaValue
isRecordStringManifest()
function isRecordStringManifest(o): o is Record<string, Manifest>Defined in: index.ts:1020
Parameters
o
unknown
Returns
o is Record<string, Manifest>
isRecordStringString()
function isRecordStringString(o): o is Record<string, string>Defined in: index.ts:979
Parameters
o
unknown
Returns
o is Record<string, string>
isRecordStringT()
function isRecordStringT<T>(o, check): o is Record<string, T>Defined in: index.ts:993
Type Parameters
• T
Parameters
o
unknown
check
(o) => o is T
Returns
o is Record<string, T>
maybeBoolean()
function maybeBoolean(o): o is booleanDefined in: index.ts:1033
Parameters
o
unknown
Returns
o is boolean
maybeDist()
function maybeDist(a): a is undefined | DistDefined in: index.ts:1044
Parameters
a
unknown
Returns
a is undefined | Dist
maybePeerDependenciesMetaSet()
function maybePeerDependenciesMetaSet( o,): o is undefined | Record<string, PeerDependenciesMetaValue>Defined in: index.ts:1025
Parameters
o
unknown
Returns
o is undefined | Record<string, PeerDependenciesMetaValue>
maybeRecordStringString()
function maybeRecordStringString( o,): o is undefined | Record<string, string>Defined in: index.ts:974
Parameters
o
unknown
Returns
o is undefined | Record<string, string>
maybeString()
function maybeString(a): a is undefined | stringDefined in: index.ts:1041
Parameters
a
unknown
Returns
a is undefined | string
normalizeBinPaths()
function normalizeBinPaths( manifest,): undefined | Record<string, string>Defined in: index.ts:714
Normalizes the bin paths.
Parameters
manifest
Pick<Manifest, "name" | "bin">
Returns
undefined | Record<string, string>
normalizeBugs()
function normalizeBugs(bugs): undefined | NormalizedBugsDefined in: index.ts:489
Normalize bugs information to a NormalizedBugs consistent format.
Parameters
bugs
unknown
Returns
undefined | NormalizedBugs
normalizeContributors()
function normalizeContributors( contributors, maintainers?,): undefined | NormalizedContributorEntry[]Defined in: index.ts:331
Normalize contributors and maintainers from various formats
Parameters
contributors
unknown
maintainers?
unknown
Returns
| undefined |
NormalizedContributorEntry[]
normalizeCpu()
function normalizeCpu(cpu): undefined | NormalizedCpuDefined in: index.ts:640
Normalize CPU information to a NormalizedCpu consistent format.
Parameters
cpu
unknown
Returns
undefined | NormalizedCpu
normalizeEngines()
function normalizeEngines(engines): undefined | NormalizedEnginesDefined in: index.ts:592
Normalize engines information to a NormalizedEngines consistent format.
Parameters
engines
unknown
Returns
undefined | NormalizedEngines
normalizeFunding()
function normalizeFunding(funding): undefined | NormalizedFundingDefined in: index.ts:160
Normalize funding information to a consistent format.
Parameters
funding
unknown
Returns
undefined | NormalizedFunding
normalizeKeywords()
function normalizeKeywords(keywords): undefined | NormalizedKeywordsDefined in: index.ts:537
Normalize keywords information to a NormalizedKeywords consistent format.
Parameters
keywords
unknown
Returns
undefined | NormalizedKeywords
normalizeManifest()
function normalizeManifest<T>(manifest): SomeNormalizedManifest<T>Defined in: index.ts:1092
Given a Manifest returns a NormalizedManifest that contains normalized author, bugs, funding, contributors, keywords and version fields.
Type Parameters
• T extends | Manifest |
ManifestRegistry
Parameters
manifest
T
Returns
normalizeOs()
function normalizeOs(os): undefined | NormalizedOsDefined in: index.ts:609
Normalize OS information to a NormalizedOs consistent format.
Parameters
os
unknown
Returns
undefined | NormalizedOs
parsePerson()
function parsePerson( person, writeAccess?, isPublisher?,): undefined | NormalizedContributorEntryDefined in: index.ts:229
Parse a string or object into a normalized contributor.
Parameters
person
unknown
writeAccess?
boolean
isPublisher?
boolean
Returns
| undefined |
NormalizedContributorEntry
parseScope()
function parseScope(scoped): [undefined | string, string]Defined in: index.ts:1515
Parse a scoped package name into its scope and name components.
Parameters
scoped
string
Returns
[undefined | string, string]