Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
babel-plugin-transform-es2015-object-super
Advanced tools
Readme
Compile ES2015 object super to ES5
In
let obj = {
say () {
return "Hello"
}
}
let obj2 = {
say () {
return super.say() + "World!"
}
}
Out
var _obj;
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var obj = {
say: function say() {
return "Hello";
}
};
var obj2 = _obj = {
say: function say() {
return _get(_obj.__proto__ || Object.getPrototypeOf(_obj), "say", this).call(this) + "World!";
}
};
npm install --save-dev babel-plugin-transform-es2015-object-super
.babelrc
(Recommended).babelrc
{
"plugins": ["transform-es2015-object-super"]
}
babel --plugins transform-es2015-object-super script.js
require("babel-core").transform("code", {
plugins: ["transform-es2015-object-super"]
});
FAQs
Compile ES2015 object super to ES5
We found that babel-plugin-transform-es2015-object-super demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).