babel-plugin-object-is
v0.0.2
Published
Babel plugin to replace Object.is with the polyfill
Downloads
6
Maintainers
Readme
babel-plugin-object-is
Important: This is still pretty untested. Consider using with caution.
Replaces instances of Object.is
with a polyfill (object-is
on npm).
Usage
$ npm install babel babel-core babel-plugin-object-is
Note: you need to specify babel-core
as a dependency for your
project (not just babel
). This is also true if you are using a
wrapper like babelify
.
Use:
$ babel --plugins object-is script.js
or:
require("babel").transform("code", { plugins: ["object-is"] });
with browserify
/ babelify
:
var b = browserify({
// browserifyoptions
}).transform(
babelify.configure({
plugins: ["object-is"]
})
);