This commit is contained in:
chrosey
2017-09-13 07:52:34 +02:00
parent a1f16c37f4
commit 2340b0226b
24621 changed files with 2912161 additions and 149 deletions
+4
View File
@@ -0,0 +1,4 @@
'use strict';
module.exports = function () {
return /\bv?(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?\b/ig;
};
+98
View File
@@ -0,0 +1,98 @@
{
"_args": [
[
{
"raw": "semver-regex@^1.0.0",
"scope": null,
"escapedName": "semver-regex",
"name": "semver-regex",
"rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"c:\\xampp\\htdocs\\laravel\\node_modules\\find-versions"
]
],
"_from": "semver-regex@>=1.0.0 <2.0.0",
"_id": "semver-regex@1.0.0",
"_inCache": true,
"_location": "/semver-regex",
"_npmUser": {
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
"_npmVersion": "1.4.14",
"_phantomChildren": {},
"_requested": {
"raw": "semver-regex@^1.0.0",
"scope": null,
"escapedName": "semver-regex",
"name": "semver-regex",
"rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/find-versions"
],
"_resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-1.0.0.tgz",
"_shasum": "92a4969065f9c70c694753d55248fc68f8f652c9",
"_shrinkwrap": null,
"_spec": "semver-regex@^1.0.0",
"_where": "c:\\xampp\\htdocs\\laravel\\node_modules\\find-versions",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/semver-regex/issues"
},
"dependencies": {},
"description": "Regular expression for matching semver versions",
"devDependencies": {
"mocha": "*"
},
"directories": {},
"dist": {
"shasum": "92a4969065f9c70c694753d55248fc68f8f652c9",
"tarball": "https://registry.npmjs.org/semver-regex/-/semver-regex-1.0.0.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"gitHead": "af62aa673025e341323eb741faec60d7bbb50c70",
"homepage": "https://github.com/sindresorhus/semver-regex",
"keywords": [
"semver",
"version",
"versions",
"regex",
"regexp",
"re",
"match",
"matching",
"semantic"
],
"license": "MIT",
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "semver-regex",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git://github.com/sindresorhus/semver-regex.git"
},
"scripts": {
"test": "mocha"
},
"version": "1.0.0"
}
+36
View File
@@ -0,0 +1,36 @@
# semver-regex [![Build Status](https://travis-ci.org/sindresorhus/semver-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/semver-regex)
> Regular expression for matching [semver](https://github.com/isaacs/node-semver) versions
## Install
```sh
$ npm install --save semver-regex
```
## Usage
```js
var semverRegex = require('semver-regex');
semverRegex().test('v1.0.0');
//=> true
semverRegex().test('1.2.3-alpha.10.beta.0+build.unicorn.rainbow');
//=> true
semverRegex().exec('unicorn 1.0.0 rainbow')[0];
//=> 1.0.0
'unicorn 1.0.0 and rainbow 2.1.3'.match(semverRegex());
//=> ['1.0.0', '2.1.3']
```
*It's a function so you can create multiple instances. Regexes with the global flag will have the `.lastIndex` property changed for each call to methods on the instance. Therefore reusing the instance with multiple calls will not work as expected for `.test()`.*
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)