Update bower dependencies.
This commit is contained in:
parent
62d4d89204
commit
ffc4dc9ec7
715 changed files with 4134 additions and 134336 deletions
263
app/bower_components/es5-shim/es5-shim.js
vendored
263
app/bower_components/es5-shim/es5-shim.js
vendored
|
@ -23,7 +23,7 @@
|
|||
} else {
|
||||
// Browser globals (root is window)
|
||||
root.returnExports = factory();
|
||||
}
|
||||
}
|
||||
}(this, function () {
|
||||
|
||||
/**
|
||||
|
@ -45,12 +45,31 @@ var array_splice = Array.prototype.splice;
|
|||
var array_push = Array.prototype.push;
|
||||
var array_unshift = Array.prototype.unshift;
|
||||
|
||||
// Having a toString local variable name breaks in Opera so use _toString.
|
||||
var _toString = prototypeOfObject.toString;
|
||||
|
||||
var isFunction = function (val) {
|
||||
return prototypeOfObject.toString.call(val) === '[object Function]';
|
||||
};
|
||||
var isRegex = function (val) {
|
||||
return prototypeOfObject.toString.call(val) === '[object RegExp]';
|
||||
};
|
||||
var isArray = function isArray(obj) {
|
||||
return _toString.call(obj) === "[object Array]";
|
||||
};
|
||||
var isArguments = function isArguments(value) {
|
||||
var str = _toString.call(value);
|
||||
var isArgs = str === '[object Arguments]';
|
||||
if (!isArgs) {
|
||||
isArgs = !isArray(str)
|
||||
&& value !== null
|
||||
&& typeof value === 'object'
|
||||
&& typeof value.length === 'number'
|
||||
&& value.length >= 0
|
||||
&& isFunction(value.callee);
|
||||
}
|
||||
return isArgs;
|
||||
};
|
||||
|
||||
//
|
||||
// Function
|
||||
|
@ -161,7 +180,7 @@ if (!Function.prototype.bind) {
|
|||
// for ex.) all use of eval or Function costructor throws an exception.
|
||||
// However in all of these environments Function.prototype.bind exists
|
||||
// and so this code will never be executed.
|
||||
var bound = Function("binder", "return function(" + boundArgs.join(",") + "){return binder.apply(this,arguments)}")(binder);
|
||||
var bound = Function("binder", "return function (" + boundArgs.join(",") + "){return binder.apply(this,arguments)}")(binder);
|
||||
|
||||
if (target.prototype) {
|
||||
Empty.prototype = target.prototype;
|
||||
|
@ -198,8 +217,6 @@ if (!Function.prototype.bind) {
|
|||
// _Please note: Shortcuts are defined after `Function.prototype.bind` as we
|
||||
// us it in defining shortcuts.
|
||||
var owns = call.bind(prototypeOfObject.hasOwnProperty);
|
||||
// Having a toString local variable name breaks in Opera so use _toString.
|
||||
var _toString = call.bind(prototypeOfObject.toString);
|
||||
|
||||
// If JS engine supports accessors creating shortcuts.
|
||||
var defineGetter;
|
||||
|
@ -221,92 +238,36 @@ if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
|
|||
|
||||
// ES5 15.4.4.12
|
||||
// http://es5.github.com/#x15.4.4.12
|
||||
// Default value for second param
|
||||
// [bugfix, ielt9, old browsers]
|
||||
// IE < 9 bug: [1,2].splice(0).join("") === "" but should be "12"
|
||||
if ([1, 2].splice(0).length !== 2) {
|
||||
if (function () { // test IE < 9 to splice bug - see issue #138
|
||||
function makeArray(l) {
|
||||
var a = [];
|
||||
while (l--) {
|
||||
a.unshift(l);
|
||||
}
|
||||
return a;
|
||||
var spliceWorksWithEmptyObject = (function () {
|
||||
var obj = {};
|
||||
Array.prototype.splice.call(obj, 0, 0, 1);
|
||||
return obj.length === 1;
|
||||
}());
|
||||
var omittingSecondSpliceArgIsNoop = [1].splice(0).length === 0;
|
||||
var spliceNoopReturnsEmptyArray = (function () {
|
||||
var a = [1, 2];
|
||||
var result = a.splice();
|
||||
return a.length === 2 && isArray(result) && result.length === 0;
|
||||
}());
|
||||
if (spliceNoopReturnsEmptyArray) {
|
||||
// Safari 5.0 bug where .split() returns undefined
|
||||
Array.prototype.splice = function splice(start, deleteCount) {
|
||||
if (arguments.length === 0) { return []; }
|
||||
else { return array_splice.apply(this, arguments); }
|
||||
};
|
||||
}
|
||||
if (!omittingSecondSpliceArgIsNoop || !spliceWorksWithEmptyObject) {
|
||||
Array.prototype.splice = function splice(start, deleteCount) {
|
||||
if (arguments.length === 0) { return []; }
|
||||
var args = arguments;
|
||||
this.length = Math.max(toInteger(this.length), 0);
|
||||
if (arguments.length > 0 && typeof deleteCount !== 'number') {
|
||||
args = _Array_slice_.call(arguments);
|
||||
if (args.length < 2) { args.push(toInteger(deleteCount)); }
|
||||
else { args[1] = toInteger(deleteCount); }
|
||||
}
|
||||
|
||||
var array = [];
|
||||
var lengthBefore;
|
||||
|
||||
array.splice.bind(array, 0, 0).apply(null, makeArray(20));
|
||||
array.splice.bind(array, 0, 0).apply(null, makeArray(26));
|
||||
|
||||
lengthBefore = array.length; //20
|
||||
array.splice(5, 0, "XXX"); // add one element
|
||||
|
||||
if (lengthBefore + 1 === array.length) {
|
||||
return true;// has right splice implementation without bugs
|
||||
}
|
||||
// else {
|
||||
// IE8 bug
|
||||
// }
|
||||
}()) { // IE 6/7
|
||||
Array.prototype.splice = function(start, deleteCount) {
|
||||
if (!arguments.length) {
|
||||
return [];
|
||||
} else {
|
||||
return array_splice.apply(this, [
|
||||
start === void 0 ? 0 : start,
|
||||
deleteCount === void 0 ? (this.length - start) : deleteCount
|
||||
].concat(_Array_slice_.call(arguments, 2)));
|
||||
}
|
||||
};
|
||||
} else { // IE8
|
||||
Array.prototype.splice = function(start, deleteCount) {
|
||||
var result;
|
||||
var args = _Array_slice_.call(arguments, 2);
|
||||
var addElementsCount = args.length;
|
||||
|
||||
if (!arguments.length) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (start === void 0) { // default
|
||||
start = 0;
|
||||
}
|
||||
if (deleteCount === void 0) { // default
|
||||
deleteCount = this.length - start;
|
||||
}
|
||||
|
||||
if (addElementsCount > 0) {
|
||||
if (deleteCount <= 0) {
|
||||
if (start === this.length) { // tiny optimisation #1
|
||||
array_push.apply(this, args);
|
||||
return [];
|
||||
}
|
||||
|
||||
if (start === 0) { // tiny optimisation #2
|
||||
array_unshift.apply(this, args);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
// Array.prototype.splice implementation
|
||||
result = _Array_slice_.call(this, start, start + deleteCount);// delete part
|
||||
args.push.apply(args, _Array_slice_.call(this, start + deleteCount, this.length));// right part
|
||||
args.unshift.apply(args, _Array_slice_.call(this, 0, start));// left part
|
||||
|
||||
// delete all items from this array and replace it to 'left part' + _Array_slice_.call(arguments, 2) + 'right part'
|
||||
args.unshift(0, this.length);
|
||||
|
||||
array_splice.apply(this, args);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
return array_splice.call(this, start, deleteCount);
|
||||
};
|
||||
|
||||
}
|
||||
return array_splice.apply(this, args);
|
||||
};
|
||||
}
|
||||
|
||||
// ES5 15.4.4.12
|
||||
|
@ -315,7 +276,7 @@ if ([1, 2].splice(0).length !== 2) {
|
|||
// [bugfix, ielt8]
|
||||
// IE < 8 bug: [].unshift(0) === undefined but should be "1"
|
||||
if ([].unshift(0) !== 1) {
|
||||
Array.prototype.unshift = function() {
|
||||
Array.prototype.unshift = function () {
|
||||
array_unshift.apply(this, arguments);
|
||||
return this.length;
|
||||
};
|
||||
|
@ -325,9 +286,7 @@ if ([].unshift(0) !== 1) {
|
|||
// http://es5.github.com/#x15.4.3.2
|
||||
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
|
||||
if (!Array.isArray) {
|
||||
Array.isArray = function isArray(obj) {
|
||||
return _toString(obj) === "[object Array]";
|
||||
};
|
||||
Array.isArray = isArray;
|
||||
}
|
||||
|
||||
// The IsCallable() check in the Array functions
|
||||
|
@ -346,7 +305,6 @@ if (!Array.isArray) {
|
|||
// http://es5.github.com/#x15.4.4.18
|
||||
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach
|
||||
|
||||
|
||||
// Check failure of by-index access of string characters (IE < 9)
|
||||
// and failure of `0 in boxedString` (Rhino)
|
||||
var boxedString = Object("a");
|
||||
|
@ -354,19 +312,25 @@ var splitString = boxedString[0] !== "a" || !(0 in boxedString);
|
|||
|
||||
var properlyBoxesContext = function properlyBoxed(method) {
|
||||
// Check node 0.6.21 bug where third parameter is not boxed
|
||||
var properlyBoxes = true;
|
||||
var properlyBoxesNonStrict = true;
|
||||
var properlyBoxesStrict = true;
|
||||
if (method) {
|
||||
method.call('foo', function (_, __, context) {
|
||||
if (typeof context !== 'object') { properlyBoxes = false; }
|
||||
if (typeof context !== 'object') { properlyBoxesNonStrict = false; }
|
||||
});
|
||||
|
||||
method.call([1], function () {
|
||||
'use strict';
|
||||
properlyBoxesStrict = typeof this === 'string';
|
||||
}, 'x');
|
||||
}
|
||||
return !!method && properlyBoxes;
|
||||
return !!method && properlyBoxesNonStrict && properlyBoxesStrict;
|
||||
};
|
||||
|
||||
if (!Array.prototype.forEach || !properlyBoxesContext(Array.prototype.forEach)) {
|
||||
Array.prototype.forEach = function forEach(fun /*, thisp*/) {
|
||||
var object = toObject(this),
|
||||
self = splitString && _toString(this) === "[object String]" ?
|
||||
self = splitString && _toString.call(this) === "[object String]" ?
|
||||
this.split("") :
|
||||
object,
|
||||
thisp = arguments[1],
|
||||
|
@ -395,7 +359,7 @@ if (!Array.prototype.forEach || !properlyBoxesContext(Array.prototype.forEach))
|
|||
if (!Array.prototype.map || !properlyBoxesContext(Array.prototype.map)) {
|
||||
Array.prototype.map = function map(fun /*, thisp*/) {
|
||||
var object = toObject(this),
|
||||
self = splitString && _toString(this) === "[object String]" ?
|
||||
self = splitString && _toString.call(this) === "[object String]" ?
|
||||
this.split("") :
|
||||
object,
|
||||
length = self.length >>> 0,
|
||||
|
@ -408,8 +372,9 @@ if (!Array.prototype.map || !properlyBoxesContext(Array.prototype.map)) {
|
|||
}
|
||||
|
||||
for (var i = 0; i < length; i++) {
|
||||
if (i in self)
|
||||
if (i in self) {
|
||||
result[i] = fun.call(thisp, self[i], i, object);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
@ -421,7 +386,7 @@ if (!Array.prototype.map || !properlyBoxesContext(Array.prototype.map)) {
|
|||
if (!Array.prototype.filter || !properlyBoxesContext(Array.prototype.filter)) {
|
||||
Array.prototype.filter = function filter(fun /*, thisp */) {
|
||||
var object = toObject(this),
|
||||
self = splitString && _toString(this) === "[object String]" ?
|
||||
self = splitString && _toString.call(this) === "[object String]" ?
|
||||
this.split("") :
|
||||
object,
|
||||
length = self.length >>> 0,
|
||||
|
@ -452,7 +417,7 @@ if (!Array.prototype.filter || !properlyBoxesContext(Array.prototype.filter)) {
|
|||
if (!Array.prototype.every || !properlyBoxesContext(Array.prototype.every)) {
|
||||
Array.prototype.every = function every(fun /*, thisp */) {
|
||||
var object = toObject(this),
|
||||
self = splitString && _toString(this) === "[object String]" ?
|
||||
self = splitString && _toString.call(this) === "[object String]" ?
|
||||
this.split("") :
|
||||
object,
|
||||
length = self.length >>> 0,
|
||||
|
@ -478,7 +443,7 @@ if (!Array.prototype.every || !properlyBoxesContext(Array.prototype.every)) {
|
|||
if (!Array.prototype.some || !properlyBoxesContext(Array.prototype.some)) {
|
||||
Array.prototype.some = function some(fun /*, thisp */) {
|
||||
var object = toObject(this),
|
||||
self = splitString && _toString(this) === "[object String]" ?
|
||||
self = splitString && _toString.call(this) === "[object String]" ?
|
||||
this.split("") :
|
||||
object,
|
||||
length = self.length >>> 0,
|
||||
|
@ -503,12 +468,12 @@ if (!Array.prototype.some || !properlyBoxesContext(Array.prototype.some)) {
|
|||
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce
|
||||
var reduceCoercesToObject = false;
|
||||
if (Array.prototype.reduce) {
|
||||
reduceCoercesToObject = typeof Array.prototype.reduce.call('a', function (_, __, ___, list) { return list; }) === 'object';
|
||||
reduceCoercesToObject = typeof Array.prototype.reduce.call('es5', function (_, __, ___, list) { return list; }) === 'object';
|
||||
}
|
||||
if (!Array.prototype.reduce || !reduceCoercesToObject) {
|
||||
Array.prototype.reduce = function reduce(fun /*, initial*/) {
|
||||
var object = toObject(this),
|
||||
self = splitString && _toString(this) === "[object String]" ?
|
||||
self = splitString && _toString.call(this) === "[object String]" ?
|
||||
this.split("") :
|
||||
object,
|
||||
length = self.length >>> 0;
|
||||
|
@ -554,10 +519,14 @@ if (!Array.prototype.reduce || !reduceCoercesToObject) {
|
|||
// ES5 15.4.4.22
|
||||
// http://es5.github.com/#x15.4.4.22
|
||||
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight
|
||||
if (!Array.prototype.reduceRight) {
|
||||
var reduceRightCoercesToObject = false;
|
||||
if (Array.prototype.reduceRight) {
|
||||
reduceRightCoercesToObject = typeof Array.prototype.reduceRight.call('es5', function (_, __, ___, list) { return list; }) === 'object';
|
||||
}
|
||||
if (!Array.prototype.reduceRight || !reduceRightCoercesToObject) {
|
||||
Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
|
||||
var object = toObject(this),
|
||||
self = splitString && _toString(this) === "[object String]" ?
|
||||
self = splitString && _toString.call(this) === "[object String]" ?
|
||||
this.split("") :
|
||||
object,
|
||||
length = self.length >>> 0;
|
||||
|
@ -594,7 +563,7 @@ if (!Array.prototype.reduceRight) {
|
|||
}
|
||||
|
||||
do {
|
||||
if (i in this) {
|
||||
if (i in self) {
|
||||
result = fun.call(void 0, result, self[i], i, object);
|
||||
}
|
||||
} while (i--);
|
||||
|
@ -608,7 +577,7 @@ if (!Array.prototype.reduceRight) {
|
|||
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
|
||||
if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) !== -1)) {
|
||||
Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
|
||||
var self = splitString && _toString(this) === "[object String]" ?
|
||||
var self = splitString && _toString.call(this) === "[object String]" ?
|
||||
this.split("") :
|
||||
toObject(this),
|
||||
length = self.length >>> 0;
|
||||
|
@ -638,7 +607,7 @@ if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) !== -1)) {
|
|||
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf
|
||||
if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) !== -1)) {
|
||||
Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
|
||||
var self = splitString && _toString(this) === "[object String]" ?
|
||||
var self = splitString && _toString.call(this) === "[object String]" ?
|
||||
this.split("") :
|
||||
toObject(this),
|
||||
length = self.length >>> 0;
|
||||
|
@ -668,6 +637,9 @@ if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) !== -1)) {
|
|||
|
||||
// ES5 15.2.3.14
|
||||
// http://es5.github.com/#x15.2.3.14
|
||||
var keysWorksWithArguments = Object.keys && (function () {
|
||||
return Object.keys(arguments).length === 2;
|
||||
}(1, 2));
|
||||
if (!Object.keys) {
|
||||
// http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
|
||||
var hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'),
|
||||
|
@ -681,26 +653,13 @@ if (!Object.keys) {
|
|||
"propertyIsEnumerable",
|
||||
"constructor"
|
||||
],
|
||||
dontEnumsLength = dontEnums.length,
|
||||
isArguments = function isArguments(value) {
|
||||
var str = _toString(value);
|
||||
var isArgs = str === '[object Arguments]';
|
||||
if (!isArgs) {
|
||||
isArgs = !Array.isArray(str)
|
||||
&& value !== null
|
||||
&& typeof value === 'object'
|
||||
&& typeof value.length === 'number'
|
||||
&& value.length >= 0
|
||||
&& isFunction(value.callee);
|
||||
}
|
||||
return isArgs;
|
||||
};
|
||||
dontEnumsLength = dontEnums.length;
|
||||
|
||||
Object.keys = function keys(object) {
|
||||
var isFn = isFunction(object),
|
||||
isArgs = isArguments(object),
|
||||
isObject = object !== null && typeof object === 'object',
|
||||
isString = isObject && _toString(object) === '[object String]';
|
||||
isString = isObject && _toString.call(object) === '[object String]';
|
||||
|
||||
if (!isObject && !isFn && !isArgs) {
|
||||
throw new TypeError("Object.keys called on a non-object");
|
||||
|
@ -732,7 +691,16 @@ if (!Object.keys) {
|
|||
}
|
||||
return theKeys;
|
||||
};
|
||||
|
||||
} else if (!keysWorksWithArguments) {
|
||||
// Safari 5.0 bug
|
||||
var originalKeys = Object.keys;
|
||||
Object.keys = function keys(object) {
|
||||
if (isArguments(object)) {
|
||||
return originalKeys(Array.prototype.slice.call(object));
|
||||
} else {
|
||||
return originalKeys(object);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -767,12 +735,10 @@ if (
|
|||
month = (month % 12 + 12) % 12;
|
||||
|
||||
// the date time string format is specified in 15.9.1.15.
|
||||
result = [month + 1, this.getUTCDate(),
|
||||
this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds()];
|
||||
result = [month + 1, this.getUTCDate(), this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds()];
|
||||
year = (
|
||||
(year < 0 ? "-" : (year > 9999 ? "+" : "")) +
|
||||
("00000" + Math.abs(year))
|
||||
.slice(0 <= year && year <= 9999 ? -4 : -6)
|
||||
("00000" + Math.abs(year)).slice(0 <= year && year <= 9999 ? -4 : -6)
|
||||
);
|
||||
|
||||
length = result.length;
|
||||
|
@ -859,7 +825,7 @@ var doesNotParseY2KNewYear = isNaN(Date.parse("2000-01-01T00:00:00.000Z"));
|
|||
if (!Date.parse || doesNotParseY2KNewYear || acceptsInvalidDates || !supportsExtendedYears) {
|
||||
// XXX global assignment won't work in embeddings that use
|
||||
// an alternate object for the context.
|
||||
Date = (function(NativeDate) {
|
||||
Date = (function (NativeDate) {
|
||||
|
||||
// Date.length === 7
|
||||
function Date(Y, M, D, h, m, s, ms) {
|
||||
|
@ -1042,7 +1008,7 @@ if (!Number.prototype.toFixed || (0.00008).toFixed(3) !== '0.000' || (0.9).toFix
|
|||
}
|
||||
}
|
||||
|
||||
function toString() {
|
||||
function numToString() {
|
||||
var i = size;
|
||||
var s = '';
|
||||
while (--i >= 0) {
|
||||
|
@ -1137,11 +1103,11 @@ if (!Number.prototype.toFixed || (0.00008).toFixed(3) !== '0.000' || (0.9).toFix
|
|||
divide(1 << j);
|
||||
multiply(1, 1);
|
||||
divide(2);
|
||||
m = toString();
|
||||
m = numToString();
|
||||
} else {
|
||||
multiply(0, z);
|
||||
multiply(1 << (-e), 0);
|
||||
m = toString() + '0.00000000000000000000'.slice(2, 2 + f);
|
||||
m = numToString() + '0.00000000000000000000'.slice(2, 2 + f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1168,7 +1134,6 @@ if (!Number.prototype.toFixed || (0.00008).toFixed(3) !== '0.000' || (0.9).toFix
|
|||
// ======
|
||||
//
|
||||
|
||||
|
||||
// ES5 15.5.4.14
|
||||
// http://es5.github.com/#x15.5.4.14
|
||||
|
||||
|
@ -1189,6 +1154,7 @@ if (
|
|||
'ab'.split(/(?:ab)*/).length !== 2 ||
|
||||
'.'.split(/(.?)(.?)/).length !== 4 ||
|
||||
'tesst'.split(/(s)*/)[1] === "t" ||
|
||||
'test'.split(/(?:)/, -1).length !== 4 ||
|
||||
''.split(/.?/).length ||
|
||||
'.'.split(/()()/).length > 1
|
||||
) {
|
||||
|
@ -1197,12 +1163,13 @@ if (
|
|||
|
||||
String.prototype.split = function (separator, limit) {
|
||||
var string = this;
|
||||
if (separator === void 0 && limit === 0)
|
||||
if (separator === void 0 && limit === 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// If `separator` is not a regex, use native split
|
||||
if (Object.prototype.toString.call(separator) !== "[object RegExp]") {
|
||||
return string_split.apply(this, arguments);
|
||||
if (_toString.call(separator) !== "[object RegExp]") {
|
||||
return string_split.call(this, separator, limit);
|
||||
}
|
||||
|
||||
var output = [],
|
||||
|
@ -1228,7 +1195,7 @@ if (
|
|||
*/
|
||||
limit = limit === void 0 ?
|
||||
-1 >>> 0 : // Math.pow(2, 32) - 1
|
||||
limit >>> 0; // ToUint32(limit)
|
||||
ToUint32(limit);
|
||||
while (match = separator.exec(string)) {
|
||||
// `separator.lastIndex` is not reliable cross-browser
|
||||
lastIndex = match.index + match[0].length;
|
||||
|
@ -1277,8 +1244,8 @@ if (
|
|||
// "0".split(undefined, 0) -> []
|
||||
} else if ("0".split(void 0, 0).length) {
|
||||
String.prototype.split = function split(separator, limit) {
|
||||
if (separator === void 0 && limit === 0) return [];
|
||||
return string_split.apply(this, arguments);
|
||||
if (separator === void 0 && limit === 0) { return []; }
|
||||
return string_split.call(this, separator, limit);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1296,7 +1263,7 @@ if (!replaceReportsGroupsCorrectly) {
|
|||
var isFn = isFunction(replaceValue);
|
||||
var hasCapturingGroups = isRegex(searchValue) && (/\)[*?]/).test(searchValue.source);
|
||||
if (!isFn || !hasCapturingGroups) {
|
||||
return str_replace.apply(this, arguments);
|
||||
return str_replace.call(this, searchValue, replaceValue);
|
||||
} else {
|
||||
var wrappedReplaceValue = function (match) {
|
||||
var length = arguments.length;
|
||||
|
@ -1313,7 +1280,7 @@ if (!replaceReportsGroupsCorrectly) {
|
|||
}
|
||||
|
||||
// ECMA-262, 3rd B.2.3
|
||||
// Note an ECMAScript standart, although ECMAScript 3rd Edition has a
|
||||
// Not an ECMAScript standard, although ECMAScript 3rd Edition has a
|
||||
// non-normative section suggesting uniform semantics and it should be
|
||||
// normalized across all browsers
|
||||
// [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE
|
||||
|
@ -1348,7 +1315,7 @@ if (!String.prototype.trim || ws.trim() || !zeroWidth.trim()) {
|
|||
trimEndRegexp = new RegExp(ws + ws + "*$");
|
||||
String.prototype.trim = function trim() {
|
||||
if (this === void 0 || this === null) {
|
||||
throw new TypeError("can't convert "+this+" to object");
|
||||
throw new TypeError("can't convert " + this + " to object");
|
||||
}
|
||||
return String(this)
|
||||
.replace(trimBeginRegexp, "")
|
||||
|
@ -1383,7 +1350,7 @@ function toInteger(n) {
|
|||
n = +n;
|
||||
if (n !== n) { // isNaN
|
||||
n = 0;
|
||||
} else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
|
||||
} else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) {
|
||||
n = (n > 0 || -1) * Math.floor(Math.abs(n));
|
||||
}
|
||||
return n;
|
||||
|
@ -1426,9 +1393,13 @@ function toPrimitive(input) {
|
|||
// http://es5.github.com/#x9.9
|
||||
var toObject = function (o) {
|
||||
if (o == null) { // this matches both null and undefined
|
||||
throw new TypeError("can't convert "+o+" to object");
|
||||
throw new TypeError("can't convert " + o + " to object");
|
||||
}
|
||||
return Object(o);
|
||||
};
|
||||
|
||||
var ToUint32 = function ToUint32(x) {
|
||||
return x >>> 0;
|
||||
};
|
||||
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue