🚀 Launch Week Day 2:Introducing Custom Tabs for Org Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

bind-operator

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

bind-operator

Transpiler for http://wiki.ecmascript.org/doku.php?id=strawman:bind_operator

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

bind-operator

Transpiler for http://wiki.ecmascript.org/doku.php?id=strawman:bind_operator

Build Status Dependency Status NPM version

Example

You could write code like:

import {unique, flatten} from "oonderscore";

[1, 2, 3, [3, 2], [1]]::flatten()::unique();
// => [1, 2, 3]

This gets transformed into:

import {unique, flatten} from "oonderscore";

unique.call(flatten.call([1, 2, 3, [3, 2], [1]]));
// => [1, 2, 3]

You can also write code like:

var clickButton = button::click;

which gets transformed to:

var clickButton = click.bind(button);

Installation

npm install bind-operator

or

npm install --global bind-operator

Usage

Via the command line:

bind-operator input.js output.js
bind-operator < input.js > output.js

Via browserify:

Just specify the transform name as bind-operator.

License

MIT

FAQs

Package last updated on 07 Sep 2014

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