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

fundot-hold

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

fundot-hold

Hold functions until arguments are given

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

Fundot Hold

Creates functions that only execute if the set number of arguments are given for the functional library Fundot

build status

Example

var hold = require('fundot-hold')

var giveMeThree = hold(3, function (one, two, three) {
  console.log({one: one, two: two, three: three})
})

giveMeThree(1)
giveMeThree(2, 2)
giveMeThree(3, 3, 3)

var giveMeOne = giveMeThree(4, 4)

giveMeOne()
giveMeOne(5)
$ node example/hold.js
{ one: 3, two: 3, three: 3 }
{ one: 4, two: 4, three: 5 }

Methods

var hold = require('fundot-hold')

hold(number, function)

Returns a function that will not call the passed function until the number of arguments given matches the original number required.

Install

With npm do:

npm install fundot-hold

License

MIT

FAQs

Package last updated on 11 Apr 2013

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