diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-10-10 03:43:44 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-10-10 03:43:44 +0200 |
commit | abd94a7f5a50f43c797a11b53549ae48fff667c3 (patch) | |
tree | ab8ed457f65cdd72e13e0571d2975729428f1551 /node_modules/vali-date | |
parent | a0247c6a3fd6a09a41a7e35a3441324c4dcb58be (diff) | |
download | wallet-core-abd94a7f5a50f43c797a11b53549ae48fff667c3.tar.xz |
add node_modules to address #4364
Diffstat (limited to 'node_modules/vali-date')
-rw-r--r-- | node_modules/vali-date/index.js | 4 | ||||
-rw-r--r-- | node_modules/vali-date/license | 21 | ||||
-rw-r--r-- | node_modules/vali-date/package.json | 97 | ||||
-rw-r--r-- | node_modules/vali-date/readme.md | 44 |
4 files changed, 166 insertions, 0 deletions
diff --git a/node_modules/vali-date/index.js b/node_modules/vali-date/index.js new file mode 100644 index 000000000..4986fcbf2 --- /dev/null +++ b/node_modules/vali-date/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function (str) { + return !isNaN(Date.parse(str)); +}; diff --git a/node_modules/vali-date/license b/node_modules/vali-date/license new file mode 100644 index 000000000..78b08554a --- /dev/null +++ b/node_modules/vali-date/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sam Verschueren <sam.verschueren@gmail.com> (github.com/SamVerschueren) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/vali-date/package.json b/node_modules/vali-date/package.json new file mode 100644 index 000000000..515783bca --- /dev/null +++ b/node_modules/vali-date/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + { + "raw": "vali-date@^1.0.0", + "scope": null, + "escapedName": "vali-date", + "name": "vali-date", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/home/dold/repos/taler/wallet-webex/node_modules/vinyl-fs" + ] + ], + "_from": "vali-date@>=1.0.0 <2.0.0", + "_id": "vali-date@1.0.0", + "_inCache": true, + "_location": "/vali-date", + "_nodeVersion": "4.2.1", + "_npmUser": { + "name": "samverschueren", + "email": "sam.verschueren@gmail.com" + }, + "_npmVersion": "3.3.10", + "_phantomChildren": {}, + "_requested": { + "raw": "vali-date@^1.0.0", + "scope": null, + "escapedName": "vali-date", + "name": "vali-date", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/vinyl-fs" + ], + "_resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", + "_shasum": "1b904a59609fb328ef078138420934f6b86709a6", + "_shrinkwrap": null, + "_spec": "vali-date@^1.0.0", + "_where": "/home/dold/repos/taler/wallet-webex/node_modules/vinyl-fs", + "author": { + "name": "Sam Verschueren", + "email": "sam.verschueren@gmail.com", + "url": "github.com/SamVerschueren" + }, + "bugs": { + "url": "https://github.com/samverschueren/vali-date/issues" + }, + "dependencies": {}, + "description": "Validate a date", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "1b904a59609fb328ef078138420934f6b86709a6", + "tarball": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "6c5251ad7ac7628f3facede9442ecd51e858ca76", + "homepage": "https://github.com/samverschueren/vali-date#readme", + "keywords": [ + "date", + "validator", + "iso8601", + "moment", + "format", + "parse" + ], + "license": "MIT", + "maintainers": [ + { + "name": "samverschueren", + "email": "sam.verschueren@gmail.com" + } + ], + "name": "vali-date", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/samverschueren/vali-date.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0" +} diff --git a/node_modules/vali-date/readme.md b/node_modules/vali-date/readme.md new file mode 100644 index 000000000..b6943363d --- /dev/null +++ b/node_modules/vali-date/readme.md @@ -0,0 +1,44 @@ +# vali-date [![Build Status](https://travis-ci.org/SamVerschueren/vali-date.svg?branch=master)](https://travis-ci.org/SamVerschueren/vali-date) + +> Validate a date. + + +## Install + +``` +$ npm install --save vali-date +``` + + +## Usage + +```js +const validate = require('vali-date'); + +validate('foo'); +//=> false + +validate('2015-12-15T12:00:00Z'); +//=> true + +validate('2015-12-15T12:00:00+01:00'); +//=> true +``` + + +## API + +### validate(date) + +Returns a boolean indicating if the date provided is valid or not. + +#### date + +Type: `string` + +The date that should be validated. + + +## License + +MIT © [Sam Verschueren](http://github.com/SamVerschueren) |