Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typeof-arguments

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typeof-arguments - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

4

package.json
{
"name": "typeof-arguments",
"version": "1.0.3",
"version": "1.0.4",
"description": "Validate the types of arguments passed to the function.",

@@ -20,4 +20,4 @@ "main": "index.js",

"dependencies": {
"of-type": "^1.0.4"
"of-type": "^1.0.6"
}
}

@@ -47,3 +47,3 @@ # Description

* the `callback` function is executed **only** if at least one argument passed through the enclosing function is of invalid type.
* the parameter **`actual`** [String] and **`expected`** [String] is passed through the callback function. The parameter `actual` indicates the actual type of the argument passed to the enclosing function, eg `'[String]'`, when the `expected` parameter indicates the type(s) expected by the user, eg. `'[Array]'`, `'[Boolean|Number]'`, `/array|object/i`.
* the parameter **`actual`** [String] and **`expected`** [String] is passed through the callback function. The parameter `actual` indicates the actual type of the argument passed through the enclosing function, eg. `'[String]'`, when the `expected` parameter indicates the type(s) expected by the user, eg. `'[Array]'`, `'[Boolean|Number]'`, `/array|object/i`.

@@ -63,3 +63,4 @@ ```javascript

#### Return value
The function `args()` returns `true` when all arguments passed to the enclosing function are of **valid** types.
The function `args()` returns `true` when all arguments passed through the enclosing function are of **valid** types.
The function `args()` returns `false` when at least **one** of the arguments passed through the enclosing function is of **invalid** type.

@@ -66,0 +67,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