aboutsummaryrefslogtreecommitdiff
path: root/node_modules/vali-date
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/vali-date')
-rw-r--r--node_modules/vali-date/index.js4
-rw-r--r--node_modules/vali-date/license21
-rw-r--r--node_modules/vali-date/package.json34
-rw-r--r--node_modules/vali-date/readme.md44
4 files changed, 103 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..cfb4b72d8
--- /dev/null
+++ b/node_modules/vali-date/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "vali-date",
+ "version": "1.0.0",
+ "description": "Validate a date",
+ "license": "MIT",
+ "repository": "SamVerschueren/vali-date",
+ "author": {
+ "name": "Sam Verschueren",
+ "email": "sam.verschueren@gmail.com",
+ "url": "github.com/SamVerschueren"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "date",
+ "validator",
+ "iso8601",
+ "moment",
+ "format",
+ "parse"
+ ],
+ "dependencies": {},
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
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)