15 lines
464 B
TypeScript
15 lines
464 B
TypeScript
/**
|
|
* Match [npm semver](https://docs.npmjs.com/cli/v6/using-npm/semver) version range.
|
|
*
|
|
* @param version Version number to match
|
|
* @param range Range pattern for version
|
|
* @returns `true` if the version number is within the range, `false` otherwise.
|
|
*
|
|
* @example
|
|
* ```
|
|
* satisfies('1.1.0', '^1.0.0'); // return true
|
|
* satisfies('1.1.0', '~1.0.0'); // return false
|
|
* ```
|
|
*/
|
|
export declare const satisfies: (version: string, range: string) => boolean;
|