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

babel-plugin-transform-object-assign

Package Overview
Dependencies
Maintainers
6
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-object-assign

Replace Object.assign with an inline helper

  • 6.22.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
62K
decreased by-33.41%
Maintainers
6
Weekly downloads
 
Created
Source

babel-plugin-transform-object-assign

Replace Object.assign with an inline helper. If you are authoring an application, rather than a library, it is recommended that you use the Object.assign polyfill instead.

Example

In

Object.assign(a, b);

Out

var _extends = ...;

_extends(a, b);

Caveats

  • Will only work with code of the form Object.assign or Object['assign']. The following patterns are not supported:

    var { assign } = Object;
    var assign = Object.assign;
    

Installation

npm install --save-dev babel-plugin-transform-object-assign

Usage

.babelrc

{
  "plugins": ["transform-object-assign"]
}

Via CLI

babel --plugins transform-object-assign script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-object-assign"]
});

Keywords

FAQs

Package last updated on 20 Jan 2017

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