tv4-formats
Advanced tools
Comparing version 2.2.2 to 3.0.0
11
index.js
(function () { | ||
'use strict'; | ||
var validator, | ||
var validator = require('validator'), | ||
moment = require('moment'), | ||
@@ -14,11 +14,2 @@ dateTimeRegExp = require('./src/dateTimeRegExp'), | ||
try { | ||
/* NPM module name */ | ||
validator = require('validator'); | ||
} | ||
catch (e) { | ||
/* Bower module name */ | ||
validator = require('validator-js' + ''); | ||
} | ||
exports.date = function (value) { | ||
@@ -25,0 +16,0 @@ if (dateRegExp.test(value) && moment(value, 'YYYY-MM-DD').isValid()) { |
{ | ||
"name": "tv4-formats", | ||
"version": "2.2.2", | ||
"version": "3.0.0", | ||
"description": "Common JSON Schema string format constraints in the form of tv4 validator callbacks", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"test": "mocha -b ./tests", | ||
"pretest": "jshint ./src ./tests index.js && jscs ./src ./tests ./index.js" | ||
"pretest": "jshint ./src ./tests index.js && jscs ./src ./tests ./index.js && webpack --hide-modules ./index.js dist/tv4-formats-bundle.js" | ||
}, | ||
@@ -32,3 +32,4 @@ "repository": { | ||
"jshint": "^2.8.0", | ||
"mocha": "^3.0.0" | ||
"mocha": "^3.0.0", | ||
"webpack": "^2.4.1" | ||
}, | ||
@@ -35,0 +36,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
0
26452
4
14
267