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

bind-last

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-last

convert data-last functions into `::`-functions

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

bind-last Build Status

convert data-last functions into ::-functions

This is a converter function to make a data-last function working with function-bind-operator

Install

$ npm install --save bind-last

Usage

import { bindLast } from 'bind-last';

const data = { id: 1, name: 'foo' };

const hasPropLast = (prop, data) => !!data[prop];
const hasThisLast = hasPropLast::bindLast()


assert.strictEqual(data::hasThisLast('name'), true);
assert.strictEqual(data::hasThisLast('nope'), false);

:: huh?

If you’re wondering what the :: thing means, you’d better read this excellent overview by @jussi-kalliokoski or have a look at the function bind syntax proposal.

License

MIT © Stoeffel

Keywords

FAQs

Package last updated on 04 Aug 2015

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