Salta al contenuto principale
Versione: Successivo

Namespace: validatioUtils

Functions

isObject

isObject(obj): boolean

Check whether an element is an Object

Parameters

NameTypeDescription
objanythe element

Returns

boolean

Defined in

validation-utils.ts:101


isPackageNameScoped

isPackageNameScoped(name): boolean

Parameters

NameType
namestring

Returns

boolean

Defined in

validation-utils.ts:10


normalizeMetadata

normalizeMetadata(manifest, name): Manifest

Validate the package metadata, add additional properties whether are missing within the metadata properties.

Parameters

NameType
manifestManifest
namestring

Returns

Manifest

the object with additional properties as dist-tags ad versions

Defined in

validation-utils.ts:72


validateName

validateName(name): boolean

From normalize-package-data/lib/fixer.js

Parameters

NameTypeDescription
namestringthe package name

Returns

boolean

whether is valid or not

Defined in

validation-utils.ts:19


validatePackage

validatePackage(name): boolean

Validate a package.

Parameters

NameType
namestring

Returns

boolean

whether the package is valid or not

Defined in

validation-utils.ts:55


validatePassword

validatePassword(password, validation?): boolean

Parameters

NameTypeDefault value
passwordstringundefined
validationRegExpDEFAULT_PASSWORD_VALIDATION

Returns

boolean

Defined in

validation-utils.ts:113


validatePublishSingleVersion

validatePublishSingleVersion(manifest): boolean

Validate if a manifest has the correct structure when a new package is being created. The properties name, versions and _attachments must contain 1 element.

Parameters

NameType
manifestany

Returns

boolean

boolean

Defined in

schemes/publish-manifest.ts:33


validateUnPublishSingleVersion

validateUnPublishSingleVersion(manifest): boolean

Validate if a manifest has the correct structure when a new package is being created. The properties name, versions and _attachments must contain 1 element.

Parameters

NameType
manifestany

Returns

boolean

boolean

Defined in

schemes/unpublish-manifest.ts:64


validateUserName

validateUserName(userName, expectedName): boolean

Parameters

NameType
userNameany
expectedNamestring

Returns

boolean

Defined in

validation-utils.ts:122