New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

parameter

Package Overview
Dependencies
Maintainers
4
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parameter - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

16

index.js

@@ -1,10 +0,1 @@

/**
* Copyright(c) node-modules and other contributors.
* MIT Licensed
*
* Authors:
* fengmk2 <fengmk2@gmail.com>
* dead_horse <dead_horse@qq.com>
*/
'use strict';

@@ -473,2 +464,9 @@

if (rule.hasOwnProperty('max') && value.length > rule.max) {
return this.t('length should smaller than %s', rule.max);
}
if (rule.hasOwnProperty('min') && value.length < rule.min) {
return this.t('length should bigger than %s', rule.min);
}
if (!rule.itemType) {

@@ -475,0 +473,0 @@ return;

This software is licensed under the MIT License.
Copyright(c) 2013 - 2015 by node-modules and other contributors.
Copyright(c) 2013 - 2017 node-modules and other contributors.

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

{
"name": "parameter",
"version": "2.1.0",
"version": "2.2.0",
"description": "A parameter verify tools.",

@@ -10,6 +10,10 @@ "main": "index.js",

"scripts": {
"test": "mocha --check-leaks -R spec -t 1000 test/*.test.js",
"test-cov": "istanbul cover node_modules/.bin/_mocha -- --check-leaks -t 1000 test/*.test.js"
"test": "mocha -R spec -t 1000 test/*.test.js",
"cov": "istanbul cover _mocha -- -t 1000 test/*.test.js",
"ci": "npm run cov",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"dependencies": {},
"dependencies": {
"npminstall": "^3.0.1"
},
"devDependencies": {

@@ -20,7 +24,8 @@ "beautify-benchmark": "0",

"mocha": "*",
"should": "*"
"should": "*",
"semantic-release": "^6.3.6"
},
"repository": {
"type": "git",
"url": "git://github.com/node-modules/parameter.git"
"url": "https://github.com/node-modules/parameter.git"
},

@@ -33,6 +38,6 @@ "keywords": [

"engines": {
"node": ">= 2.0.0"
"node": ">= 4.0.0"
},
"author": "fengmk2 <fengmk2@gmail.com>",
"license": "MIT"
}
}

@@ -8,2 +8,3 @@ parameter

[![npm download][download-image]][download-url]
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)

@@ -160,6 +161,8 @@ [npm-image]: https://img.shields.io/npm/v/parameter.svg?style=flat-square

If type is `array`, there has tow addition rule:
If type is `array`, there has four addition rule:
- `itemType` - The type of every item in this array.
- `rule` - An object that validate the items of the array. Only work with `itemType`.
- `max` - The maximun length of the array.
- `min` - The minimun lenght of the array.

@@ -166,0 +169,0 @@ #### abbr

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