aurelia-polyfills
Advanced tools
Comparing version 1.0.0-beta.1.0.2 to 1.0.0-beta.1.0.3
{ | ||
"name": "aurelia-polyfills", | ||
"version": "1.0.0-beta.1.0.2", | ||
"version": "1.0.0-beta.1.0.3", | ||
"description": "The minimal set of polyfills that the Aurelia platform needs to run on ES5 browsers.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -208,3 +208,3 @@ define(['exports', 'aurelia-pal'], function (exports, _aureliaPal) { | ||
var str = toString.call(this), | ||
tst = this[Symbol.toStringTag]; | ||
tst = typeof this === 'undefined' ? undefined : this[Symbol.toStringTag]; | ||
return typeof tst === 'undefined' ? str : '[object ' + tst + ']'; | ||
@@ -422,2 +422,50 @@ }; | ||
} | ||
(function () { | ||
var needsFix = false; | ||
try { | ||
var s = Object.keys('a'); | ||
needsFix = s.length !== 1 || s[0] !== '0'; | ||
} catch (e) { | ||
needsFix = true; | ||
} | ||
if (needsFix) { | ||
Object.keys = (function () { | ||
var hasOwnProperty = Object.prototype.hasOwnProperty, | ||
hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'), | ||
dontEnums = ['toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor'], | ||
dontEnumsLength = dontEnums.length; | ||
return function (obj) { | ||
if (obj === undefined || obj === null) { | ||
throw TypeError('Cannot convert undefined or null to object'); | ||
} | ||
obj = Object(obj); | ||
var result = [], | ||
prop, | ||
i; | ||
for (prop in obj) { | ||
if (hasOwnProperty.call(obj, prop)) { | ||
result.push(prop); | ||
} | ||
} | ||
if (hasDontEnumBug) { | ||
for (i = 0; i < dontEnumsLength; i++) { | ||
if (hasOwnProperty.call(obj, dontEnums[i])) { | ||
result.push(dontEnums[i]); | ||
} | ||
} | ||
} | ||
return result; | ||
}; | ||
})(); | ||
} | ||
})(); | ||
(function (O) { | ||
@@ -424,0 +472,0 @@ if ('assign' in O) return; |
@@ -251,3 +251,3 @@ import {PLATFORM} from 'aurelia-pal'; | ||
str = toString.call(this), | ||
tst = this[Symbol.toStringTag] | ||
tst = typeof this === 'undefined' ? undefined : this[Symbol.toStringTag] | ||
; | ||
@@ -488,2 +488,57 @@ return typeof tst === 'undefined' ? str : ('[object ' + tst + ']'); | ||
} | ||
(function() { | ||
let needsFix = false; | ||
//ES5 did not accept primitives, but ES6 does | ||
try { | ||
let s = Object.keys('a'); | ||
needsFix = (s.length !== 1 || s[0] !== '0'); | ||
} catch(e) { | ||
needsFix = true; | ||
} | ||
if (needsFix) { | ||
Object.keys = (function() { | ||
var hasOwnProperty = Object.prototype.hasOwnProperty, | ||
hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'), | ||
dontEnums = [ | ||
'toString', | ||
'toLocaleString', | ||
'valueOf', | ||
'hasOwnProperty', | ||
'isPrototypeOf', | ||
'propertyIsEnumerable', | ||
'constructor' | ||
], | ||
dontEnumsLength = dontEnums.length; | ||
return function(obj) { | ||
if (obj === undefined || obj === null){ | ||
throw TypeError(`Cannot convert undefined or null to object`); | ||
} | ||
obj = Object(obj); | ||
var result = [], prop, i; | ||
for (prop in obj) { | ||
if (hasOwnProperty.call(obj, prop)) { | ||
result.push(prop); | ||
} | ||
} | ||
if (hasDontEnumBug) { | ||
for (i = 0; i < dontEnumsLength; i++) { | ||
if (hasOwnProperty.call(obj, dontEnums[i])) { | ||
result.push(dontEnums[i]); | ||
} | ||
} | ||
} | ||
return result; | ||
}; | ||
}()); | ||
} | ||
}()); | ||
(function (O) { | ||
@@ -490,0 +545,0 @@ if ('assign' in O) return; |
@@ -209,3 +209,3 @@ 'use strict'; | ||
var str = toString.call(this), | ||
tst = this[Symbol.toStringTag]; | ||
tst = typeof this === 'undefined' ? undefined : this[Symbol.toStringTag]; | ||
return typeof tst === 'undefined' ? str : '[object ' + tst + ']'; | ||
@@ -423,2 +423,50 @@ }; | ||
} | ||
(function () { | ||
var needsFix = false; | ||
try { | ||
var s = Object.keys('a'); | ||
needsFix = s.length !== 1 || s[0] !== '0'; | ||
} catch (e) { | ||
needsFix = true; | ||
} | ||
if (needsFix) { | ||
Object.keys = (function () { | ||
var hasOwnProperty = Object.prototype.hasOwnProperty, | ||
hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'), | ||
dontEnums = ['toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor'], | ||
dontEnumsLength = dontEnums.length; | ||
return function (obj) { | ||
if (obj === undefined || obj === null) { | ||
throw TypeError('Cannot convert undefined or null to object'); | ||
} | ||
obj = Object(obj); | ||
var result = [], | ||
prop, | ||
i; | ||
for (prop in obj) { | ||
if (hasOwnProperty.call(obj, prop)) { | ||
result.push(prop); | ||
} | ||
} | ||
if (hasDontEnumBug) { | ||
for (i = 0; i < dontEnumsLength; i++) { | ||
if (hasOwnProperty.call(obj, dontEnums[i])) { | ||
result.push(dontEnums[i]); | ||
} | ||
} | ||
} | ||
return result; | ||
}; | ||
})(); | ||
} | ||
})(); | ||
(function (O) { | ||
@@ -425,0 +473,0 @@ if ('assign' in O) return; |
@@ -251,3 +251,3 @@ import {PLATFORM} from 'aurelia-pal'; | ||
str = toString.call(this), | ||
tst = this[Symbol.toStringTag] | ||
tst = typeof this === 'undefined' ? undefined : this[Symbol.toStringTag] | ||
; | ||
@@ -488,2 +488,57 @@ return typeof tst === 'undefined' ? str : ('[object ' + tst + ']'); | ||
} | ||
(function() { | ||
let needsFix = false; | ||
//ES5 did not accept primitives, but ES6 does | ||
try { | ||
let s = Object.keys('a'); | ||
needsFix = (s.length !== 1 || s[0] !== '0'); | ||
} catch(e) { | ||
needsFix = true; | ||
} | ||
if (needsFix) { | ||
Object.keys = (function() { | ||
var hasOwnProperty = Object.prototype.hasOwnProperty, | ||
hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'), | ||
dontEnums = [ | ||
'toString', | ||
'toLocaleString', | ||
'valueOf', | ||
'hasOwnProperty', | ||
'isPrototypeOf', | ||
'propertyIsEnumerable', | ||
'constructor' | ||
], | ||
dontEnumsLength = dontEnums.length; | ||
return function(obj) { | ||
if (obj === undefined || obj === null){ | ||
throw TypeError(`Cannot convert undefined or null to object`); | ||
} | ||
obj = Object(obj); | ||
var result = [], prop, i; | ||
for (prop in obj) { | ||
if (hasOwnProperty.call(obj, prop)) { | ||
result.push(prop); | ||
} | ||
} | ||
if (hasDontEnumBug) { | ||
for (i = 0; i < dontEnumsLength; i++) { | ||
if (hasOwnProperty.call(obj, dontEnums[i])) { | ||
result.push(dontEnums[i]); | ||
} | ||
} | ||
} | ||
return result; | ||
}; | ||
}()); | ||
} | ||
}()); | ||
(function (O) { | ||
@@ -490,0 +545,0 @@ if ('assign' in O) return; |
@@ -215,3 +215,3 @@ System.register(['aurelia-pal'], function (_export) { | ||
var str = toString.call(this), | ||
tst = this[Symbol.toStringTag]; | ||
tst = typeof this === 'undefined' ? undefined : this[Symbol.toStringTag]; | ||
return typeof tst === 'undefined' ? str : '[object ' + tst + ']'; | ||
@@ -429,2 +429,50 @@ }; | ||
} | ||
(function () { | ||
var needsFix = false; | ||
try { | ||
var s = Object.keys('a'); | ||
needsFix = s.length !== 1 || s[0] !== '0'; | ||
} catch (e) { | ||
needsFix = true; | ||
} | ||
if (needsFix) { | ||
Object.keys = (function () { | ||
var hasOwnProperty = Object.prototype.hasOwnProperty, | ||
hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'), | ||
dontEnums = ['toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor'], | ||
dontEnumsLength = dontEnums.length; | ||
return function (obj) { | ||
if (obj === undefined || obj === null) { | ||
throw TypeError('Cannot convert undefined or null to object'); | ||
} | ||
obj = Object(obj); | ||
var result = [], | ||
prop, | ||
i; | ||
for (prop in obj) { | ||
if (hasOwnProperty.call(obj, prop)) { | ||
result.push(prop); | ||
} | ||
} | ||
if (hasDontEnumBug) { | ||
for (i = 0; i < dontEnumsLength; i++) { | ||
if (hasOwnProperty.call(obj, dontEnums[i])) { | ||
result.push(dontEnums[i]); | ||
} | ||
} | ||
} | ||
return result; | ||
}; | ||
})(); | ||
} | ||
})(); | ||
(function (O) { | ||
@@ -431,0 +479,0 @@ if ('assign' in O) return; |
@@ -0,1 +1,9 @@ | ||
### 1.0.0-beta.1.0.3 (2016-03-07) | ||
#### Bug Fixes | ||
* **object:** correct es6 Object.keys behavior for primitives ([11852935](http://github.com/aurelia/polyfills/commit/11852935d02a451f2ea13c48dd0dd6877d890c8e)) | ||
### 1.0.0-beta.1.0.2 (2016-03-06) | ||
@@ -2,0 +10,0 @@ |
{ | ||
"name": "aurelia-polyfills", | ||
"version": "1.0.0-beta.1.0.2", | ||
"version": "1.0.0-beta.1.0.3", | ||
"description": "The minimal set of polyfills that the Aurelia platform needs to run on ES5 browsers.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -0,1 +1,56 @@ | ||
(function() { | ||
let needsFix = false; | ||
//ES5 did not accept primitives, but ES6 does | ||
try { | ||
let s = Object.keys('a'); | ||
needsFix = (s.length !== 1 || s[0] !== '0'); | ||
} catch(e) { | ||
needsFix = true; | ||
} | ||
if (needsFix) { | ||
Object.keys = (function() { | ||
var hasOwnProperty = Object.prototype.hasOwnProperty, | ||
hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'), | ||
dontEnums = [ | ||
'toString', | ||
'toLocaleString', | ||
'valueOf', | ||
'hasOwnProperty', | ||
'isPrototypeOf', | ||
'propertyIsEnumerable', | ||
'constructor' | ||
], | ||
dontEnumsLength = dontEnums.length; | ||
return function(obj) { | ||
if (obj === undefined || obj === null){ | ||
throw TypeError(`Cannot convert undefined or null to object`); | ||
} | ||
obj = Object(obj); | ||
var result = [], prop, i; | ||
for (prop in obj) { | ||
if (hasOwnProperty.call(obj, prop)) { | ||
result.push(prop); | ||
} | ||
} | ||
if (hasDontEnumBug) { | ||
for (i = 0; i < dontEnumsLength; i++) { | ||
if (hasOwnProperty.call(obj, dontEnums[i])) { | ||
result.push(dontEnums[i]); | ||
} | ||
} | ||
} | ||
return result; | ||
}; | ||
}()); | ||
} | ||
}()); | ||
(function (O) { | ||
@@ -2,0 +57,0 @@ if ('assign' in O) return; |
@@ -249,3 +249,3 @@ (function (Object, GOPS) {'use strict'; | ||
str = toString.call(this), | ||
tst = this[Symbol.toStringTag] | ||
tst = typeof this === 'undefined' ? undefined : this[Symbol.toStringTag] | ||
; | ||
@@ -252,0 +252,0 @@ return typeof tst === 'undefined' ? str : ('[object ' + tst + ']'); |
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
229932
5093