You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@babel/plugin-transform-object-assign

Package Overview
Dependencies
Maintainers
4
Versions
81
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

7.0.0-beta.33
Source
npmnpm
Version published
Weekly downloads
674K
-5.66%
Maintainers
4
Weekly downloads
 
Created

What is @babel/plugin-transform-object-assign?

@babel/plugin-transform-object-assign is a Babel plugin that transforms ES6 Object.assign() calls into a more compatible form for older environments that do not support Object.assign(). This is particularly useful for ensuring code compatibility across different JavaScript environments.

What are @babel/plugin-transform-object-assign's main functionalities?

Transform Object.assign()

This feature transforms the ES6 Object.assign() method into a compatible form for older JavaScript environments. The code sample demonstrates how Object.assign() is used to merge properties from a source object into a target object.

const target = { a: 1 };
const source = { b: 2 };
const result = Object.assign(target, source);
console.log(result); // { a: 1, b: 2 }

Other packages similar to @babel/plugin-transform-object-assign

Keywords

babel-plugin

FAQs

Package last updated on 01 Dec 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