Comparing version 1.0.0 to 1.1.0
@@ -6,3 +6,4 @@ 'use strict'; | ||
options = Object.assign({ | ||
includePrereleases: true | ||
includePrereleases: true, | ||
clean: true | ||
}, options); | ||
@@ -16,3 +17,7 @@ | ||
return sortedVersions.map(x => semver.clean(x)); | ||
if (options.clean) { | ||
sortedVersions = sortedVersions.map(x => semver.clean(x)); | ||
} | ||
return sortedVersions; | ||
}; |
{ | ||
"name": "to-semver", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Get an array of valid, sorted, and cleaned semver versions from an array of strings", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -55,3 +55,10 @@ # to-semver [![Build Status](https://travis-ci.org/sindresorhus/to-semver.svg?branch=master)](https://travis-ci.org/sindresorhus/to-semver) | ||
##### clean | ||
Type: `boolean`<br> | ||
Default: `true` | ||
Clean versions. For example `v1.3.0` → `1.3.0`. | ||
## Related | ||
@@ -58,0 +65,0 @@ |
3887
16
74