Socket
Socket
Sign inDemoInstall

aproba

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aproba - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

6

index.js
'use strict'
function isArguments (thingy) {
return typeof thingy === 'object' && thingy.hasOwnProperty('callee')
}
var types = {
'*': ['any', function () { return true }],
A: ['array', function (thingy) { return (Array.isArray && Array.isArray(thingy)) || (typeof thingy === 'object' && thingy.hasOwnProperty('callee')) }],
A: ['array', function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }],
S: ['string', function (thingy) { return typeof thingy === 'string' }],

@@ -7,0 +11,0 @@ N: ['number', function (thingy) { return typeof thingy === 'number' }],

9

package.json
{
"name": "aproba",
"version": "1.0.3",
"version": "1.0.4",
"description": "A rediculously light-weight argument validator",

@@ -11,5 +11,8 @@ "main": "index.js",

"devDependencies": {
"standard": "^7.1.0",
"tap": "^5.7.1"
"standard": "^7.1.2",
"tap": "^5.7.3"
},
"files": [
"index.js"
],
"scripts": {

@@ -16,0 +19,0 @@ "test": "standard && tap test/*.js"

aproba
======
A rediculously light-weight function argument validator
A ridiculously light-weight function argument validator

@@ -37,4 +37,8 @@ ```

If an error argument is found and is not null then the remaining arguments will not be validated.
If you pass in an invalid type then it will throw with a code of
`EUNKNOWNTYPE`.
If an error argument is found and is not null then the remaining arguments
will not be validated.
### Why this exists

@@ -41,0 +45,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc