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 3.0.0 to 3.0.1

2

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

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

@@ -49,6 +49,10 @@ # Description

* The one [Object] argument is passed through `callback` function with the following properties:
* `index` indicates the [Number] index of the incorrect argument passed through the enclosing function, eg. `0`, `1`
* `actual` indicates the actual type of the argument passed through the enclosing function, eg. `'[String]'`
* `expected` indicates the type(s) expected by the user, eg. `'[Array]'`, `'[Boolean|Number]'`, `/array|object/i`
* `message` is the default error [String] message, that you can use for example to throw an error in the callback function
* **`index`**
indicates the [Number] index of the incorrect argument passed through the enclosing function, eg. `0`, `1`
* **`actual`**
indicates the actual type of the argument passed through the enclosing function, eg. `'[String]'`
* **`expected`**
indicates the type(s) expected by the user, eg. `'[Array]'`, `'[Boolean|Number]'`, `/array|object/i`
* **`message`**
is the default error [String] message, that you can use for example to throw an error in the callback function

@@ -55,0 +59,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