🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

useware

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

useware

Accept Arguments object or multiple arguments that can be any value, including deeply nested arrays. Flatten the arguments/values then filter them to be only functions. Useful for `.use` methods.

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

useware npmjs.com The MIT License

Accept Arguments object or multiple arguments that can be any value, including deeply nested arrays. Flatten the arguments/values then filter them to be only functions.
Useful for .use methods.

code climate standard code style travis build status coverage status dependency status

Install

npm i useware --save
npm test

Usage

For more use-cases see the tests

const useware = require('useware')

function fixtureArguments () {
  return useware(arguments)
}

function fixtureMultiple () {
  return useware.apply(this, arguments)
}

function fn1 () {}
function fn2 () {}
function fn3 () {}

fixtureArguments(fn1, [1, [2, 3, fn2]], {foo: 'bar'}, [fn3, [4, 5]])
//=> [fn1, fn2, fn3]

fixtureMultiple([1, fn1, [2, [fn3, [4, 5]], fn2]], fn1, [6, [fn3, 7, 'a']])
//=> [fn1, fn3, fn2, fn1, fn3]

Note that functions are not uniqueified

  • benz: Compose your control flow with absolute elegance. Support async/await, callbacks, thunks, generators, promises, observables, child… more
  • composer: Boilerplate for creating a node.js application based on Template, vinyl and orchestrator. This consists of… more
  • generate: Project generator, for node.js.
  • vez: Middleware composition at new level. Ultimate alternative to ware, plugins, koa-compose and composition packages. Allows… more
  • verb: Documentation generator for GitHub projects. Extremely powerful, easy to use, can generate anything from API… more
  • useware-context: Much like useware but with the ability to bind given context to each function.

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.

Charlike Make Reagent new message to charlike freenode #charlike

tunnckocore.tk keybase tunnckocore tunnckoCore npm tunnckoCore twitter tunnckoCore github

Keywords

any

FAQs

Package last updated on 06 Feb 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