babel-plugin-transform-proto-to-assign

JSON →
library 6.26.0 ·javascript deprecated
verified May 27, 2026

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.

total hits 17
actors 6 distinct systems
last hit 17h ago AhrefsBot
ByteDance
3
GPTBot
2
Script
1
Search engines
1
Humans
2

top countries 🇩🇪 Germany · 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · 🇬🇧 United Kingdom