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 3.4.0 to 3.5.0

6

History.md
3.5.0 / 2018-12-11
==================
**features**
* [[`ee3521c`](http://github.com/node-modules/parameter/commit/ee3521c74e73630b5b72014d7aeba7ed87eb865e)] - feat: support override options.widelyUndefined (#59) (Yiyu He <<dead_horse@qq.com>>)
3.4.0 / 2018-10-30

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

4

index.es5.js

@@ -94,3 +94,5 @@ 'use strict';

// treat null / '' / NaN as undefined
if (this.widelyUndefined && (value === '' || value === null || Number.isNaN(value))) {
var widelyUndefined = this.widelyUndefined;
if ('widelyUndefined' in rule) widelyUndefined = rule.widelyUndefined;
if (widelyUndefined && (value === '' || value === null || Number.isNaN(value))) {
value = obj[key] = undefined;

@@ -97,0 +99,0 @@ }

@@ -80,3 +80,5 @@ 'use strict';

// treat null / '' / NaN as undefined
if (this.widelyUndefined &&
let widelyUndefined = this.widelyUndefined;
if ('widelyUndefined' in rule) widelyUndefined = rule.widelyUndefined;
if (widelyUndefined &&
(value === '' || value === null || Number.isNaN(value))) {

@@ -83,0 +85,0 @@ value = obj[key] = undefined;

{
"name": "parameter",
"version": "3.4.0",
"version": "3.5.0",
"description": "A parameter verify tools.",

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

@@ -84,2 +84,3 @@ parameter

- `default` - The default value of property, once the property is allowed non-required and missed, parameter will use this as the default value. __This may change the original input params__.
- `widelyUndefined` - override `options.widelyUndefined`

@@ -86,0 +87,0 @@ __Note: you can combile require and type end with a notation `?` like: `int?` or `string?` to specific both type and non-required.__

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