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

argvd

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

argvd

describe all parameters of a function.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Argvd

Argvd, describe all parameters of a function.

Installation

$> npm install argvd --save

Examples

var argvd = require('argvd');

function anyfunction(a, b, array, param4, param5) {
  var result = argvd.desc(arguments); //List

  console.log("Arguments described:\n", JSON.stringify(result, null, 2));
  console.log("hasNumbers?: ", argvd.hasNumbers(arguments));
  console.log("hasString?: ", argvd.hasString(arguments));
  console.log("hasArray?: ", argvd.hasArray(arguments));
  console.log("hasFunction?: ", argvd.hasFunction(arguments));
  console.log("hasObject?: ", argvd.hasObject(arguments));
  console.log("Count: ", argvd.count(arguments));
}

var arr = [1, 2, 3, 4];
anyfunction(2, 4, arr, "Hello", function(){}, Object());

/*
Arguments described:
 [
  {
    "key": "0",
    "value": 2,
    "type": "number"
  },
  {
    "key": "1",
    "value": 4,
    "type": "number"
  },
  {
    "key": "2",
    "value": [
      1,
      2,
      3,
      4
    ],
    "type": "array"
  },
  {
    "key": "3",
    "value": "Hello",
    "type": "string"
  },
  {
    "key": "4",
    "type": "function"
  },
  {
    "key": "5",
    "value": {},
    "type": "object"
  }
]
hasNumbers?:  true
hasString?:  true
hasArray?:  true
hasFunction?:  true
hasObject?:  true
Count:  6
*/

Keywords

FAQs

Package last updated on 25 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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