babel-plugin-transform-builtin-extend
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -54,3 +54,3 @@ 'use strict'; | ||
*/ | ||
var buildHelper = (0, _babelTemplate2.default)('\n function HELPER(cls){\n function ExtendableBuiltin(){\n var instance = cls.apply(this, arguments) || this;\n Object.setPrototypeOf(instance, Object.getPrototypeOf(this));\n return instance;\n }\n ExtendableBuiltin.prototype = Object.create(cls.prototype, {\n constructor: {\n value: cls,\n enumerable: false,\n writable: true,\n configurable: true,\n }\n });\n if (Object.setPrototypeOf){\n Object.setPrototypeOf(ExtendableBuiltin, cls);\n } else {\n ExtendableBuiltin.__proto__ = cls;\n }\n\n return ExtendableBuiltin;\n }\n'); | ||
var buildHelper = (0, _babelTemplate2.default)('\n function HELPER(cls){\n function ExtendableBuiltin(){\n // Not passing "newTarget" because core-js would fall back to non-exotic\n // object creation.\n var instance = Reflect.construct(cls, Array.from(arguments));\n Object.setPrototypeOf(instance, Object.getPrototypeOf(this));\n return instance;\n }\n ExtendableBuiltin.prototype = Object.create(cls.prototype, {\n constructor: {\n value: cls,\n enumerable: false,\n writable: true,\n configurable: true,\n },\n });\n if (Object.setPrototypeOf){\n Object.setPrototypeOf(ExtendableBuiltin, cls);\n } else {\n ExtendableBuiltin.__proto__ = cls;\n }\n\n return ExtendableBuiltin;\n }\n'); | ||
@@ -63,2 +63,2 @@ /** | ||
*/ | ||
var buildHelperApproximate = (0, _babelTemplate2.default)('\n function HELPER(cls){\n function ExtendableBuiltin(){\n cls.apply(this, arguments);\n }\n ExtendableBuiltin.prototype = Object.create(cls.prototype, {\n constructor: {\n value: cls,\n enumerable: false,\n writable: true,\n configurable: true,\n }\n });\n if (Object.setPrototypeOf){\n Object.setPrototypeOf(ExtendableBuiltin, cls);\n } else {\n ExtendableBuiltin.__proto__ = cls;\n }\n\n return ExtendableBuiltin;\n }\n'); | ||
var buildHelperApproximate = (0, _babelTemplate2.default)('\n function HELPER(cls){\n function ExtendableBuiltin(){\n cls.apply(this, arguments);\n }\n ExtendableBuiltin.prototype = Object.create(cls.prototype, {\n constructor: {\n value: cls,\n enumerable: false,\n writable: true,\n configurable: true,\n },\n });\n if (Object.setPrototypeOf){\n Object.setPrototypeOf(ExtendableBuiltin, cls);\n } else {\n ExtendableBuiltin.__proto__ = cls;\n }\n\n return ExtendableBuiltin;\n }\n'); |
{ | ||
"name": "babel-plugin-transform-builtin-extend", | ||
"description": "A plugin for Babel 6 supports extending from builtin types based on static analysis.", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"author": "Logan Smyth <loganfsmyth@gmail.com>", | ||
@@ -6,0 +6,0 @@ "main": "lib", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10204