JSPM

babel-plugin-object-assign

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3151
  • Score
    100M100P100Q120174F
  • License MIT

Babel plugin to replace Object.assign with the extends helper

Package Exports

  • babel-plugin-object-assign

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (babel-plugin-object-assign) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.

Usage

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

$ npm install babel babel-plugin-object-assign
$ babel --plugins object-assign script.js

or

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