babel-plugin-transform-proto-to-assign
JSON →This Babel plugin transforms assignments to __proto__ into a shallow property copy, enabling prototype-like inheritance in environments that do not support __proto__ or Object.setPrototypeOf. The latest stable version is 6.26.0 (2017-01-30), part of Babel 6.x. It is maintained as part of the Babel monorepo but is considered legacy; Babel 7+ discourages use of this plugin and instead recommends using Object.setPrototypeOf or Object.create for performance reasons. The plugin does a shallow clone of all enumerable own properties from the target prototype. It works only with assignments like `obj.__proto__ = proto`, not `Object.setPrototypeOf`. It modifies Object.prototype, which can cause side effects. It is a single-purpose transform, not part of any preset-env. Alternative: use `@babel/plugin-transform-proto-to-assign` for Babel 7. The plugin is deprecated in favor of modern Object.setPrototypeOf.
Traffic · last 30 days ↑33% vs prev 7d
top countries 🇩🇪 Germany · 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · 🇬🇧 United Kingdom