UNPKG

722 BTypeScriptView Raw
1import Range = require('../classes/range');
2import semver = require('../index');
3
4/**
5 * Return a "simplified" range that matches the same items in `versions` list as the range specified.
6 * Note that it does *not* guarantee that it would match the same versions in all cases,
7 * only for the set of versions provided.
8 * This is useful when generating ranges by joining together multiple versions with `||` programmatically,
9 * to provide the user with something a bit more ergonomic.
10 * If the provided range is shorter in string-length than the generated range, then that is returned.
11 */
12declare function simplify(ranges: string[], range: string | Range, options?: semver.Options): string | Range;
13
14export = simplify;