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.2.3 to 2.3.0

6

History.md
2.3.0 / 2018-06-19
==================
**features**
* [[`a5c1721`](http://github.com/node-modules/parameter/commit/a5c172179071aaaafb6fac604bc6bf4ebb0c8d98)] - feat: Add option.validateRoot to enable validate the root object (#41) (paranoidjk <<hust2012jiangkai@gmail.com>>)
2.2.3 / 2018-05-16

@@ -3,0 +9,0 @@ ==================

@@ -32,2 +32,6 @@ 'use strict';

}
if (opts.validateRoot) {
this.validateRoot = true;
}
}

@@ -56,2 +60,10 @@

if (this.validateRoot && (typeof obj !== 'object' || !obj)) {
return [{
message: 'the validated value should be a object',
code: this.t('invalid'),
field: undefined,
}];
}
var self = this;

@@ -58,0 +70,0 @@

2

package.json
{
"name": "parameter",
"version": "2.2.3",
"version": "2.3.0",
"description": "A parameter verify tools.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -35,2 +35,3 @@ parameter

- `options.translate` - translate function
- `options.validateRoot` - config whether to validate the passed in value must be a object.
- `validate(rule, value)` - validate the `value` conforms to `rule`. return an array of errors if break rule.

@@ -51,3 +52,4 @@ - `addRule(type, check)` - add custom rules.

return I18n.t.apply(I18n, args);
}
},
validateRoot: true, // restrict the being validate value must be a object
});

@@ -54,0 +56,0 @@

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