Socket
Socket
Sign inDemoInstall

f-bind

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    f-bind

Library mimicking the proposed function-bind operator


Version published
Weekly downloads
1
Maintainers
1
Install size
1.21 kB
Created
Weekly downloads
 

Readme

Source

F-bind

Library mimicking the proposed function-bind operator (::)

Using bind operator

const {unique} = require('some-array-extras-lib')
console.log(
  [1, 2, 2, 4]
  ::unique() // call custom method
  .filter(n => n % 2 == 0) // call native method
  .map(n => n * 10)
) // prints [20, 40]

Using f-bind library

const {unique} = require('some-array-extras-lib')
const $ = require('f-bind')
console.log(
  $([1, 2, 2, 4]) // wrap
  .$(unique)() // call custom method
  .$('filter')(n => n % 2 == 0) // call native method
  .$('map')(n => n * 10)
  .$() // unwrap
) // prints [20, 40]

Keywords

FAQs

Last updated on 22 Nov 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc