Skip to content

Commit

Permalink
chore(all): prepare release 1.0.0-beta.1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Mar 8, 2016
1 parent 6ed412f commit 727575b
Show file tree
Hide file tree
Showing 8 changed files with 391 additions and 302 deletions.
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "aurelia-polyfills",
"version": "1.0.0-beta.1.0.4",
"version": "1.0.0-beta.1.0.5",
"description": "The minimal set of polyfills that the Aurelia platform needs to run on ES5 browsers.",
"keywords": [
"aurelia",
Expand Down
136 changes: 76 additions & 60 deletions dist/amd/aurelia-polyfills.js
Expand Up @@ -7,7 +7,7 @@ define(['exports', 'aurelia-pal'], function (exports, _aureliaPal) {
if (GOPS in Object) return;

var setDescriptor,
G = typeof global === typeof G ? window : global,
G = _aureliaPal.PLATFORM.global,
id = 0,
random = '' + Math.random(),
prefix = '__\x01symbol:',
Expand Down Expand Up @@ -345,79 +345,95 @@ define(['exports', 'aurelia-pal'], function (exports, _aureliaPal) {
}

if (!Array.prototype.find) {
Array.prototype.find = function (predicate) {
if (this === null) {
throw new TypeError('Array.prototype.find called on null or undefined');
}
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var list = Object(this);
var length = list.length >>> 0;
var thisArg = arguments[1];
var value;

for (var i = 0; i < length; i++) {
value = list[i];
if (predicate.call(thisArg, value, i, list)) {
return value;
Object.defineProperty(Array.prototype, 'find', {
configurable: true,
writable: true,
enumerable: false,
value: function value(predicate) {
if (this === null) {
throw new TypeError('Array.prototype.find called on null or undefined');
}
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var list = Object(this);
var length = list.length >>> 0;
var thisArg = arguments[1];
var value;

for (var i = 0; i < length; i++) {
value = list[i];
if (predicate.call(thisArg, value, i, list)) {
return value;
}
}
return undefined;
}
return undefined;
};
});
}

if (!Array.prototype.findIndex) {
Array.prototype.findIndex = function (predicate) {
if (this === null) {
throw new TypeError('Array.prototype.findIndex called on null or undefined');
}
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var list = Object(this);
var length = list.length >>> 0;
var thisArg = arguments[1];
var value;

for (var i = 0; i < length; i++) {
value = list[i];
if (predicate.call(thisArg, value, i, list)) {
return i;
Object.defineProperty(Array.prototype, 'findIndex', {
configurable: true,
writable: true,
enumerable: false,
value: function value(predicate) {
if (this === null) {
throw new TypeError('Array.prototype.findIndex called on null or undefined');
}
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var list = Object(this);
var length = list.length >>> 0;
var thisArg = arguments[1];
var value;

for (var i = 0; i < length; i++) {
value = list[i];
if (predicate.call(thisArg, value, i, list)) {
return i;
}
}
return -1;
}
return -1;
};
});
}

if (!Array.prototype.includes) {
Array.prototype.includes = function (searchElement) {
var O = Object(this);
var len = parseInt(O.length) || 0;
if (len === 0) {
return false;
}
var n = parseInt(arguments[1]) || 0;
var k;
if (n >= 0) {
k = n;
} else {
k = len + n;
if (k < 0) {
k = 0;
Object.defineProperty(Array.prototype, 'includes', {
configurable: true,
writable: true,
enumerable: false,
value: function value(searchElement) {
var O = Object(this);
var len = parseInt(O.length) || 0;
if (len === 0) {
return false;
}
}
var currentElement;
while (k < len) {
currentElement = O[k];
if (searchElement === currentElement || searchElement !== searchElement && currentElement !== currentElement) {
return true;
var n = parseInt(arguments[1]) || 0;
var k;
if (n >= 0) {
k = n;
} else {
k = len + n;
if (k < 0) {
k = 0;
}
}
var currentElement;
while (k < len) {
currentElement = O[k];
if (searchElement === currentElement || searchElement !== searchElement && currentElement !== currentElement) {
return true;
}
k++;
}
k++;
return false;
}
return false;
};
});
}

(function () {
var needsFix = false;

Expand Down
136 changes: 76 additions & 60 deletions dist/aurelia-polyfills.js
Expand Up @@ -8,7 +8,7 @@ import {PLATFORM} from 'aurelia-pal';

var
setDescriptor,
G = typeof global === typeof G ? window : global,
G = PLATFORM.global,
id = 0,
random = '' + Math.random(),
prefix = '__\x01symbol:',
Expand Down Expand Up @@ -412,78 +412,94 @@ if (!Array.from) {
}

if (!Array.prototype.find) {
Array.prototype.find = function(predicate) {
if (this === null) {
throw new TypeError('Array.prototype.find called on null or undefined');
}
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var list = Object(this);
var length = list.length >>> 0;
var thisArg = arguments[1];
var value;

for (var i = 0; i < length; i++) {
value = list[i];
if (predicate.call(thisArg, value, i, list)) {
return value;
Object.defineProperty(Array.prototype, 'find', {
configurable: true,
writable: true,
enumerable: false,
value: function(predicate) {
if (this === null) {
throw new TypeError('Array.prototype.find called on null or undefined');
}
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var list = Object(this);
var length = list.length >>> 0;
var thisArg = arguments[1];
var value;

for (var i = 0; i < length; i++) {
value = list[i];
if (predicate.call(thisArg, value, i, list)) {
return value;
}
}
return undefined;
}
return undefined;
};
});
}

if (!Array.prototype.findIndex) {
Array.prototype.findIndex = function(predicate) {
if (this === null) {
throw new TypeError('Array.prototype.findIndex called on null or undefined');
}
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var list = Object(this);
var length = list.length >>> 0;
var thisArg = arguments[1];
var value;

for (var i = 0; i < length; i++) {
value = list[i];
if (predicate.call(thisArg, value, i, list)) {
return i;
Object.defineProperty(Array.prototype, 'findIndex', {
configurable: true,
writable: true,
enumerable: false,
value: function(predicate) {
if (this === null) {
throw new TypeError('Array.prototype.findIndex called on null or undefined');
}
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var list = Object(this);
var length = list.length >>> 0;
var thisArg = arguments[1];
var value;

for (var i = 0; i < length; i++) {
value = list[i];
if (predicate.call(thisArg, value, i, list)) {
return i;
}
}
return -1;
}
return -1;
};
});
}

if (!Array.prototype.includes) {
Array.prototype.includes = function(searchElement /*, fromIndex*/ ) {
var O = Object(this);
var len = parseInt(O.length) || 0;
if (len === 0) {
return false;
}
var n = parseInt(arguments[1]) || 0;
var k;
if (n >= 0) {
k = n;
} else {
k = len + n;
if (k < 0) {k = 0;}
}
var currentElement;
while (k < len) {
currentElement = O[k];
if (searchElement === currentElement ||
(searchElement !== searchElement && currentElement !== currentElement)) { // NaN !== NaN
return true;
Object.defineProperty(Array.prototype, 'includes', {
configurable: true,
writable: true,
enumerable: false,
value: function(searchElement /*, fromIndex*/ ) {
var O = Object(this);
var len = parseInt(O.length) || 0;
if (len === 0) {
return false;
}
k++;
var n = parseInt(arguments[1]) || 0;
var k;
if (n >= 0) {
k = n;
} else {
k = len + n;
if (k < 0) {k = 0;}
}
var currentElement;
while (k < len) {
currentElement = O[k];
if (searchElement === currentElement ||
(searchElement !== searchElement && currentElement !== currentElement)) { // NaN !== NaN
return true;
}
k++;
}
return false;
}
return false;
};
});
}

(function() {
let needsFix = false;

Expand Down

0 comments on commit 727575b

Please sign in to comment.