Namespace: validatioUtils
Functions
isObject
▸ isObject(obj
): boolean
Check whether an element is an Object
Parameters
Name | Type | Description |
---|---|---|
obj | any | the element |
Returns
boolean
Defined in
isPackageNameScoped
▸ isPackageNameScoped(name
): boolean
Parameters
Name | Type |
---|---|
name | string |
Returns
boolean
Defined in
normalizeMetadata
▸ normalizeMetadata(manifest
, name
): Manifest
Validate the package metadata, add additional properties whether are missing within the metadata properties.
Parameters
Name | Type |
---|---|
manifest | Manifest |
name | string |
Returns
Manifest
the object with additional properties as dist-tags ad versions
Defined in
validateName
▸ validateName(name
): boolean
From normalize-package-data/lib/fixer.js
Parameters
Name | Type | Description |
---|---|---|
name | string | the package name |
Returns
boolean
whether is valid or not
Defined in
validatePackage
▸ validatePackage(name
): boolean
Validate a package.
Parameters
Name | Type |
---|---|
name | string |
Returns
boolean
whether the package is valid or not
Defined in
validatePassword
▸ validatePassword(password
, validation?
): boolean
Parameters
Name | Type | Default value |
---|---|---|
password | string | undefined |
validation | RegExp | DEFAULT_PASSWORD_VALIDATION |
Returns
boolean
Defined in
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
Name | Type |
---|---|
manifest | any |
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
Name | Type |
---|---|
manifest | any |
Returns
boolean
boolean
Defined in
schemes/unpublish-manifest.ts:64
validateUserName
▸ validateUserName(userName
, expectedName
): boolean
Parameters
Name | Type |
---|---|
userName | any |
expectedName | string |
Returns
boolean