Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

anchor

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anchor - npm Package Compare versions

Comparing version 0.10.2 to 0.10.3

Makefile

2

lib/match/matchRule.js

@@ -21,3 +21,3 @@ /**

// if args is an array we need to make it a nested array
if (Array.isArray(args)) {
if (Array.isArray(args) && ruleName !== 'len') {
args = [args];

@@ -24,0 +24,0 @@ }

@@ -7,2 +7,3 @@ /**

var validator = require('validator');
var GeoJSON = require('gjtk');

@@ -21,3 +22,3 @@

// Transform data to work properly with node validator
if(!x && x !== 0) x = '';
if(!x && x !== 0 && x !== false) x = '';
else if(typeof x.toString !== 'undefined') x = x.toString();

@@ -50,3 +51,5 @@ else x = '' + x;

},
'geojson' : GeoJSON.isGeoJSON,
'mediumtext' : _.isString,
'longtext' : _.isString,
'text' : _.isString,

@@ -92,3 +95,3 @@ 'string' : _.isString,

'hexadecimal': validator.hexadecimal,
'hexadecimal': validator.isHexadecimal,
'hexColor': validator.isHexColor,

@@ -106,3 +109,3 @@

'notContains': function (x, str) { return !validator.contains(x, str); },
'len' : function (x, min, max) { return validator.len(x, min, max); },
'len' : function (x, min, max) { return validator.isLength(x, min, max); },
'in' : validator.isIn,

@@ -109,0 +112,0 @@ 'notIn' : function (x, arrayOrString) { return !validator.isIn(x, arrayOrString); },

{
"name": "anchor",
"version": "0.10.2",
"version": "0.10.3",
"description": "Recursive validation library with support for objects and lists",

@@ -24,3 +24,3 @@ "homepage": "http://sailsjs.org",

"scripts": {
"test": "echo Running tests... && mocha --globals testRule"
"test": "make test"
},

@@ -35,4 +35,5 @@ "repository": {

"dependencies": {
"validator": "~3.22.0",
"lodash": "~2.4.1"
"validator": "~3.40.0",
"lodash": "~3.9.3",
"gjtk": "~1.0.0b"
},

@@ -39,0 +40,0 @@ "devDependencies": {

anchor
======
[![Build Status](https://travis-ci.org/balderdashy/anchor.svg?branch=master)](https://travis-ci.org/balderdashy/anchor)
[![npm version](https://badge.fury.io/js/anchor.svg)](http://badge.fury.io/js/anchor)
[![Dependency Status](https://david-dm.org/balderdashy/anchor.svg)](https://david-dm.org/balderdashy/anchor)

@@ -4,0 +7,0 @@ Anchor is a javascript library that lets you define strict types.

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc