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

binded

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

binded

binded methods as pure functions

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

binded

NPM version Build Status Coveralls Status Dependency Status

binded methods as pure functions

Install

npm install --save binded

Usage

import binded from 'binded';

const { log, warn } = binded(console);
const { resolve, reject, all } = binded(Promise);

resolve('unicorns').then(log) // unicorns

binded(console); /*
  { log: [Function: bound bound ],
    info: [Function: bound bound ],
    warn: [Function: bound bound ],
    error: [Function: bound bound ],
    dir: [Function: bound bound ],
    time: [Function: bound bound ],
    timeEnd: [Function: bound bound ],
    trace: [Function: bound bound trace],
    assert: [Function: bound bound ],
    Console: [Function: bound Console] } */

binded(Promise); /*
  { resolve: [Function: bound resolve],
    all: [Function: bound all],
    race: [Function: bound race],
    reject: [Function: bound reject] } */

API

binded(input)

Return an Object with functions of methods binded to input, so you can use log from console without it throwing an Error.

input

Required
Type: Function or Object

Function Constructor or an Object.

License

MIT © Vladimir Starkov

Keywords

FAQs

Package last updated on 05 Apr 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