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

check-types-mini

Package Overview
Dependencies
Maintainers
1
Versions
198
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-types-mini - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

4

changelog.md

@@ -7,2 +7,6 @@ # Change Log

## [1.2.0] - 2017-05-15
### Added
- opts.ignoreKeys won't throw now if input is a single string.
## [1.1.0] - 2017-05-15

@@ -9,0 +13,0 @@ ### Added

@@ -36,2 +36,9 @@ 'use strict'

opts = objectAssign(clone(defaults), opts)
if (typeof opts.ignoreKeys === 'string') {
if (opts.ignoreKeys.length > 0) {
opts.ignoreKeys = [opts.ignoreKeys]
} else {
opts.ignoreKeys = []
}
}
if (!isArr(opts.ignoreKeys)) {

@@ -38,0 +45,0 @@ throw new TypeError('check-types-mini/checkTypes(): [THROW_ID_03] opts.ignoreKeys should be an array, currently it\'s: ' + type(opts.ignoreKeys))

2

package.json
{
"name": "check-types-mini",
"version": "1.1.1",
"version": "1.2.0",
"description": "Check the types of your options object's values after user has customised them",

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

@@ -63,3 +63,3 @@ # check-types-mini

{ | | | |
`ignoreKeys` | Array | no | `[]` (empty array) | Instructs to skip all and any checks on keys, specified in this array. Put them as strings.
`ignoreKeys` | Array or String | no | `[]` (empty array) | Instructs to skip all and any checks on keys, specified in this array. Put them as strings.
} | | | |

@@ -66,0 +66,0 @@

@@ -126,2 +126,8 @@ 'use strict'

}, 'check-types-mini/checkTypes(): [THROW_ID_03] opts.ignoreKeys should be an array, currently it\'s: boolean')
t.notThrows(function () {
checkTypes({a: 'a'}, {a: 'b'}, 'aa', 'bbb', { ignoreKeys: 'a' })
})
t.notThrows(function () {
checkTypes({a: 'a'}, {a: 'b'}, 'aa', 'bbb', { ignoreKeys: '' })
})
})
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