find-versions

6.0.0last stable release 10 months ago
Complexity Score
Low
Open Issues
0
Dependent Projects
137
Weekly Downloadsglobal
4,256,163

License

  • MIT
    • Yesattribution
    • Permissivelinking
    • Permissivedistribution
    • Permissivemodification
    • Nopatent grant
    • Yesprivate use
    • Permissivesublicensing
    • Notrademark grant

Downloads

Readme

find-versions

Find semver versions in a string: unicorn v1.2.31.2.3

Install

npm install find-versions

Usage

import findVersions from 'find-versions';

findVersions('unicorn v1.2.3 rainbow 2.3.4+build.1');
//=> ['1.2.3', '2.3.4+build.1']

findVersions('cp (GNU coreutils) 8.22', {loose: true});
//=> ['8.22.0']

API

findVersions(stringWithVersions, options?)

stringWithVersions

Type: string

options

Type: object

loose

Type: boolean
Default: false

Also match non-semver versions like 1.88. They’re coerced into semver compliant versions.

Related

  • find-versions-cli - CLI for this module

Dependencies

CVE IssuesActive
0
Scorecards Score
4.20
Test Coverage
No Data
Follows Semver
Yes
Github Stars
45
Dependenciestotal
5
DependenciesOutdated
0
DependenciesDeprecated
0
Threat Modelling
No
Repo Audits
No

Learn how to distribute find-versions in your own private NPM registry

npm config set registry  https://npm.cloudsmith.com/owner/repo
Processing...
Done
npm install find-versions
Processing...
Done

17 Releases

NPM on Cloudsmith

Getting started with NPM on Cloudsmith is fast and easy.