babel-plugin-transform-object-set-prototype-of-to-assign
This plugin will transform all
Object.setPrototypeOf
calls to a method that will do a shallow defaults of all properties.
NOTE: There are some caveats when using this plugin, see the babel-plugin-transform-proto-to-assign
README for more information..
Example
In
Object;
Out
var _defaults = ...; ;
Installation
npm install --save-dev babel-plugin-transform-object-set-prototype-of-to-assign
Usage
.babelrc
(Recommended)
Via .babelrc
Via CLI
babel --plugins transform-object-set-prototype-of-to-assign script.js
Via Node API
;