Skip to content

Babel plugin to replace Object.assign with the extends helper

License

Notifications You must be signed in to change notification settings

pieterv/babel-plugin-object-assign

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Object.assign plugin for Babel

Babel plugin that replaces Object.assign() with the extends helper.

Useful to reduce the need for additional polyfills or libraries when you want something that extends objects in browsers without native support.

Thanks to @sebmck for the implementation.

Usage

Instead of using _.extend(obj1, obj2...) or xtend(obj1, obj2...) just use Object.assign in your code and include this plugin for Babel.

Install:

$ npm install babel babel-plugin-object-assign

Use:

$ babel --plugins object-assign script.js

or:

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

About

Babel plugin to replace Object.assign with the extends helper

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published