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

@babel/plugin-syntax-function-bind

Package Overview
Dependencies
Maintainers
5
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-syntax-function-bind

Allow parsing of function bind

  • 7.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
54K
decreased by-62.59%
Maintainers
5
Weekly downloads
 
Created

What is @babel/plugin-syntax-function-bind?

@babel/plugin-syntax-function-bind is a Babel plugin that allows you to use the function bind syntax in your JavaScript code. This syntax is a proposed feature for ECMAScript that allows you to bind a function to a specific context (this value) more succinctly.

What are @babel/plugin-syntax-function-bind's main functionalities?

Function Bind Syntax

This feature allows you to use the `::` operator to bind a function to a specific context. In this example, `obj::getX` binds the `getX` function to the `obj` object, so when `boundGetX` is called, it returns `42`.

const obj = { x: 42 };
const getX = function() { return this.x; };
const boundGetX = obj::getX;
console.log(boundGetX()); // 42

Other packages similar to @babel/plugin-syntax-function-bind

Keywords

FAQs

Package last updated on 03 Dec 2018

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