Comparing version 0.1.3 to 0.1.4
{ | ||
"name": "es6-set", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "ECMAScript6 Set polyfill", | ||
@@ -20,3 +20,3 @@ "author": "Mariusz Nowak <medyk@medikoo.com> (http://www.medikoo.com/)", | ||
"d": "~0.1.1", | ||
"es5-ext": "~0.10.8", | ||
"es5-ext": "~0.10.11", | ||
"es6-iterator": "2", | ||
@@ -23,0 +23,0 @@ "es6-symbol": "3", |
@@ -17,8 +17,10 @@ 'use strict'; | ||
, defineProperty = Object.defineProperty, getPrototypeOf = Object.getPrototypeOf | ||
, SetPoly, getValues; | ||
, SetPoly, getValues, NativeSet; | ||
module.exports = SetPoly = function (/*iterable*/) { | ||
if (isNative) NativeSet = Set; | ||
module.exports = SetPoly = function Set(/*iterable*/) { | ||
var iterable = arguments[0], self; | ||
if (!(this instanceof SetPoly)) throw new TypeError('Constructor requires \'new\''); | ||
if (isNative && setPrototypeOf) self = setPrototypeOf(new Set(), getPrototypeOf(this)); | ||
if (isNative && setPrototypeOf) self = setPrototypeOf(new NativeSet(), getPrototypeOf(this)); | ||
else self = this; | ||
@@ -36,4 +38,4 @@ if (iterable != null) iterator(iterable); | ||
if (isNative) { | ||
if (setPrototypeOf) setPrototypeOf(SetPoly, Set); | ||
SetPoly.prototype = Object.create(Set.prototype, { constructor: d(SetPoly) }); | ||
if (setPrototypeOf) setPrototypeOf(SetPoly, NativeSet); | ||
SetPoly.prototype = Object.create(NativeSet.prototype, { constructor: d(SetPoly) }); | ||
} | ||
@@ -40,0 +42,0 @@ |
Sorry, the diff of this file is not supported yet
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
27487
640
Updatedes5-ext@~0.10.11