Socket
Socket
Sign inDemoInstall

data-validation

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.3 to 0.5.5

2

bower.json
{
"name": "data-validation",
"version": "0.5.3",
"version": "0.5.5",
"dependencies": {},

@@ -5,0 +5,0 @@ "devDependencies": {

@@ -1,2 +0,2 @@

if(typeof module != 'undefined') {
if(typeof module !== 'undefined' && module.exports) {
var _ = require('lodash');

@@ -14,3 +14,3 @@ }

var test = value;
return (test != 0 && test != undefined);
return (test !== '' && test !== undefined && test !== null);
},

@@ -87,4 +87,4 @@

if(typeof module != 'undefined') {
if(typeof module !== 'undefined' && module.exports) {
module.exports = dataValidation;
}

@@ -5,3 +5,7 @@ module.exports = function(config) {

basePath: '..',
frameworks: ['jasmine'],
frameworks: [
'mocha',
'chai',
'sinon'
],
browsers: ['PhantomJS'],

@@ -12,3 +16,3 @@ singleRun: true,

'components/lodash/dist/lodash.js',
'tests/*.js',
'test/*.spec.js',
'*.js'

@@ -15,0 +19,0 @@ ]

{
"name": "data-validation",
"version": "0.5.3",
"version": "0.5.5",
"description": "Data validation for JavaScript",

@@ -26,5 +26,9 @@ "keywords": [

"devDependencies": {
"karma": "0.12.16",
"karma": "0.12.23",
"karma-phantomjs-launcher": "0.1.4",
"mocha": "1.18.2",
"karma-mocha": "0.1.9",
"karma-chai": "0.1.0",
"karma-sinon": "1.0.3",
"mocha": "1.20.1",
"sinon": "1.10.3",
"chai": "1.9.1"

@@ -31,0 +35,0 @@ },

@@ -1,5 +0,5 @@

var expect = require('chai').expect;
var dataValidation = require('../data-validation');
describe('Data Validation', function() {
var dataValidation = require('../data-validation');
var expect = require('chai').expect;
describe('Data Validation', function(){
describe("Basic Functionality", function() {

@@ -30,2 +30,6 @@ it('should be able to add a validator', function() {

it('should validate 0 as not empty', function() {
expect(dataValidation.validate('notEmpty', 0)).to.be.true;
});
it('should validate 20 as not less than 10', function() {

@@ -32,0 +36,0 @@ expect(dataValidation.validate('minValue', 20, 10)).to.be.true;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc