Constructor
new NpmVersion(name, version)
Create a NpmVersion
- Source:
Parameters:
Name | Type | Description |
---|---|---|
name |
string
|
npm name |
version |
string
|
npm version, e.g. ">= 1.0.0" |
Methods
(async) match() → {Promise.<boolean>}
Async to check if the specified npm version in package-lock.json or
yarn.lock matches npm version comparator.
- Source:
Returns:
- Type:
-
Promise.<boolean>
true if matches, otherwise false.
matchSync() → {boolean}
Sync to check if the specified npm version in package-lock.json or
yarn.lock matches npm version comparator.
- Source:
Returns:
- Type:
-
boolean
true if matches, otherwise false.