Update bower dependencies.
This commit is contained in:
parent
818bdad5af
commit
2beab45f32
185 changed files with 21480 additions and 8110 deletions
303
app/bower_components/es5-shim/es5-shim.js
vendored
303
app/bower_components/es5-shim/es5-shim.js
vendored
|
@ -340,6 +340,26 @@
|
|||
var toStr = call.bind(ObjectPrototype.toString);
|
||||
var arraySlice = call.bind(array_slice);
|
||||
var arraySliceApply = apply.bind(array_slice);
|
||||
/* globals document */
|
||||
if (typeof document === 'object' && document && document.documentElement) {
|
||||
try {
|
||||
arraySlice(document.documentElement.childNodes);
|
||||
} catch (e) {
|
||||
var origArraySlice = arraySlice;
|
||||
var origArraySliceApply = arraySliceApply;
|
||||
arraySlice = function arraySliceIE(arr) {
|
||||
var r = [];
|
||||
var i = arr.length;
|
||||
while (i-- > 0) {
|
||||
r[i] = arr[i];
|
||||
}
|
||||
return origArraySliceApply(r, origArraySlice(arguments, 1));
|
||||
};
|
||||
arraySliceApply = function arraySliceApplyIE(arr, args) {
|
||||
return origArraySliceApply(arraySlice(arr), args);
|
||||
};
|
||||
}
|
||||
}
|
||||
var strSlice = call.bind(StringPrototype.slice);
|
||||
var strSplit = call.bind(StringPrototype.split);
|
||||
var strIndexOf = call.bind(StringPrototype.indexOf);
|
||||
|
@ -933,10 +953,14 @@
|
|||
var sortIgnoresNonFunctions = (function () {
|
||||
try {
|
||||
[1, 2].sort(null);
|
||||
[1, 2].sort({});
|
||||
return true;
|
||||
} catch (e) {}
|
||||
return false;
|
||||
} catch (e) {
|
||||
try {
|
||||
[1, 2].sort({});
|
||||
} catch (e2) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}());
|
||||
var sortThrowsOnRegex = (function () {
|
||||
// this is a problem in Firefox 4, in which `typeof /a/ === 'function'`
|
||||
|
@ -975,24 +999,40 @@
|
|||
// http://es5.github.com/#x15.2.3.14
|
||||
|
||||
// http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
|
||||
var hasDontEnumBug = !isEnum({ 'toString': null }, 'toString');
|
||||
var hasDontEnumBug = !isEnum({ 'toString': null }, 'toString'); // jscs:ignore disallowQuotedKeysInObjects
|
||||
var hasProtoEnumBug = isEnum(function () {}, 'prototype');
|
||||
var hasStringEnumBug = !owns('x', '0');
|
||||
var equalsConstructorPrototype = function (o) {
|
||||
var ctor = o.constructor;
|
||||
return ctor && ctor.prototype === o;
|
||||
};
|
||||
var blacklistedKeys = {
|
||||
$window: true,
|
||||
var excludedKeys = {
|
||||
$applicationCache: true,
|
||||
$console: true,
|
||||
$parent: true,
|
||||
$self: true,
|
||||
$external: true,
|
||||
$frame: true,
|
||||
$frames: true,
|
||||
$frameElement: true,
|
||||
$frames: true,
|
||||
$innerHeight: true,
|
||||
$innerWidth: true,
|
||||
$outerHeight: true,
|
||||
$outerWidth: true,
|
||||
$pageXOffset: true,
|
||||
$pageYOffset: true,
|
||||
$parent: true,
|
||||
$scrollLeft: true,
|
||||
$scrollTop: true,
|
||||
$scrollX: true,
|
||||
$scrollY: true,
|
||||
$self: true,
|
||||
$webkitIndexedDB: true,
|
||||
$webkitStorageInfo: true,
|
||||
$external: true
|
||||
$window: true,
|
||||
|
||||
$width: true,
|
||||
$height: true,
|
||||
$top: true,
|
||||
$localStorage: true
|
||||
};
|
||||
var hasAutomationEqualityBug = (function () {
|
||||
/* globals window */
|
||||
|
@ -1001,7 +1041,7 @@
|
|||
}
|
||||
for (var k in window) {
|
||||
try {
|
||||
if (!blacklistedKeys['$' + k] && owns(window, k) && window[k] !== null && typeof window[k] === 'object') {
|
||||
if (!excludedKeys['$' + k] && owns(window, k) && window[k] !== null && typeof window[k] === 'object') {
|
||||
equalsConstructorPrototype(window[k]);
|
||||
}
|
||||
} catch (e) {
|
||||
|
@ -1037,12 +1077,12 @@
|
|||
return toStr(value) === '[object Arguments]';
|
||||
};
|
||||
var isLegacyArguments = function isArguments(value) {
|
||||
return value !== null &&
|
||||
typeof value === 'object' &&
|
||||
typeof value.length === 'number' &&
|
||||
value.length >= 0 &&
|
||||
!isArray(value) &&
|
||||
isCallable(value.callee);
|
||||
return value !== null
|
||||
&& typeof value === 'object'
|
||||
&& typeof value.length === 'number'
|
||||
&& value.length >= 0
|
||||
&& !isArray(value)
|
||||
&& isCallable(value.callee);
|
||||
};
|
||||
var isArguments = isStandardArguments(arguments) ? isStandardArguments : isLegacyArguments;
|
||||
|
||||
|
@ -1119,10 +1159,10 @@
|
|||
var timeZoneOffset = aNegativeTestDate.getTimezoneOffset();
|
||||
if (timeZoneOffset < -720) {
|
||||
hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Tue Jan 02 -45875';
|
||||
hasToStringFormatBug = !(/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/).test(aPositiveTestDate.toString());
|
||||
hasToStringFormatBug = !(/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/).test(String(aPositiveTestDate));
|
||||
} else {
|
||||
hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Mon Jan 01 -45875';
|
||||
hasToStringFormatBug = !(/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/).test(aPositiveTestDate.toString());
|
||||
hasToStringFormatBug = !(/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/).test(String(aPositiveTestDate));
|
||||
}
|
||||
|
||||
var originalGetFullYear = call.bind(Date.prototype.getFullYear);
|
||||
|
@ -1231,13 +1271,13 @@
|
|||
var hour = originalGetUTCHours(this);
|
||||
var minute = originalGetUTCMinutes(this);
|
||||
var second = originalGetUTCSeconds(this);
|
||||
return dayName[day] + ', ' +
|
||||
(date < 10 ? '0' + date : date) + ' ' +
|
||||
monthName[month] + ' ' +
|
||||
year + ' ' +
|
||||
(hour < 10 ? '0' + hour : hour) + ':' +
|
||||
(minute < 10 ? '0' + minute : minute) + ':' +
|
||||
(second < 10 ? '0' + second : second) + ' GMT';
|
||||
return dayName[day] + ', '
|
||||
+ (date < 10 ? '0' + date : date) + ' '
|
||||
+ monthName[month] + ' '
|
||||
+ year + ' '
|
||||
+ (hour < 10 ? '0' + hour : hour) + ':'
|
||||
+ (minute < 10 ? '0' + minute : minute) + ':'
|
||||
+ (second < 10 ? '0' + second : second) + ' GMT';
|
||||
}
|
||||
}, hasNegativeMonthYearBug || hasToUTCStringFormatBug);
|
||||
|
||||
|
@ -1251,10 +1291,10 @@
|
|||
var date = this.getDate();
|
||||
var month = this.getMonth();
|
||||
var year = this.getFullYear();
|
||||
return dayName[day] + ' ' +
|
||||
monthName[month] + ' ' +
|
||||
(date < 10 ? '0' + date : date) + ' ' +
|
||||
year;
|
||||
return dayName[day] + ' '
|
||||
+ monthName[month] + ' '
|
||||
+ (date < 10 ? '0' + date : date) + ' '
|
||||
+ year;
|
||||
}
|
||||
}, hasNegativeMonthYearBug || hasToDateStringFormatBug);
|
||||
|
||||
|
@ -1274,16 +1314,16 @@
|
|||
var timezoneOffset = this.getTimezoneOffset();
|
||||
var hoursOffset = Math.floor(Math.abs(timezoneOffset) / 60);
|
||||
var minutesOffset = Math.floor(Math.abs(timezoneOffset) % 60);
|
||||
return dayName[day] + ' ' +
|
||||
monthName[month] + ' ' +
|
||||
(date < 10 ? '0' + date : date) + ' ' +
|
||||
year + ' ' +
|
||||
(hour < 10 ? '0' + hour : hour) + ':' +
|
||||
(minute < 10 ? '0' + minute : minute) + ':' +
|
||||
(second < 10 ? '0' + second : second) + ' GMT' +
|
||||
(timezoneOffset > 0 ? '-' : '+') +
|
||||
(hoursOffset < 10 ? '0' + hoursOffset : hoursOffset) +
|
||||
(minutesOffset < 10 ? '0' + minutesOffset : minutesOffset);
|
||||
return dayName[day] + ' '
|
||||
+ monthName[month] + ' '
|
||||
+ (date < 10 ? '0' + date : date) + ' '
|
||||
+ year + ' '
|
||||
+ (hour < 10 ? '0' + hour : hour) + ':'
|
||||
+ (minute < 10 ? '0' + minute : minute) + ':'
|
||||
+ (second < 10 ? '0' + second : second) + ' GMT'
|
||||
+ (timezoneOffset > 0 ? '-' : '+')
|
||||
+ (hoursOffset < 10 ? '0' + hoursOffset : hoursOffset)
|
||||
+ (minutesOffset < 10 ? '0' + minutesOffset : minutesOffset);
|
||||
};
|
||||
if (supportsDescriptors) {
|
||||
$Object.defineProperty(Date.prototype, 'toString', {
|
||||
|
@ -1303,7 +1343,7 @@
|
|||
// this object is not a finite Number a RangeError exception is thrown.
|
||||
var negativeDate = -62198755200000;
|
||||
var negativeYearString = '-000001';
|
||||
var hasNegativeDateBug = Date.prototype.toISOString && new Date(negativeDate).toISOString().indexOf(negativeYearString) === -1;
|
||||
var hasNegativeDateBug = Date.prototype.toISOString && new Date(negativeDate).toISOString().indexOf(negativeYearString) === -1; // eslint-disable-line max-len
|
||||
var hasSafari51DateBug = Date.prototype.toISOString && new Date(-1).toISOString() !== '1969-12-31T23:59:59.999Z';
|
||||
|
||||
var getTime = call.bind(Date.prototype.getTime);
|
||||
|
@ -1320,13 +1360,19 @@
|
|||
var month = originalGetUTCMonth(this);
|
||||
// see https://github.com/es-shims/es5-shim/issues/111
|
||||
year += Math.floor(month / 12);
|
||||
month = (month % 12 + 12) % 12;
|
||||
month = ((month % 12) + 12) % 12;
|
||||
|
||||
// the date time string format is specified in 15.9.1.15.
|
||||
var result = [month + 1, originalGetUTCDate(this), originalGetUTCHours(this), originalGetUTCMinutes(this), originalGetUTCSeconds(this)];
|
||||
var result = [
|
||||
month + 1,
|
||||
originalGetUTCDate(this),
|
||||
originalGetUTCHours(this),
|
||||
originalGetUTCMinutes(this),
|
||||
originalGetUTCSeconds(this)
|
||||
];
|
||||
year = (
|
||||
(year < 0 ? '-' : (year > 9999 ? '+' : '')) +
|
||||
strSlice('00000' + Math.abs(year), (0 <= year && year <= 9999) ? -4 : -6)
|
||||
(year < 0 ? '-' : (year > 9999 ? '+' : ''))
|
||||
+ strSlice('00000' + Math.abs(year), (0 <= year && year <= 9999) ? -4 : -6)
|
||||
);
|
||||
|
||||
for (var i = 0; i < result.length; ++i) {
|
||||
|
@ -1335,9 +1381,9 @@
|
|||
}
|
||||
// pad milliseconds to have three digits.
|
||||
return (
|
||||
year + '-' + arraySlice(result, 0, 2).join('-') +
|
||||
'T' + arraySlice(result, 2).join(':') + '.' +
|
||||
strSlice('000' + originalGetUTCMilliseconds(this), -3) + 'Z'
|
||||
year + '-' + arraySlice(result, 0, 2).join('-')
|
||||
+ 'T' + arraySlice(result, 2).join(':') + '.'
|
||||
+ strSlice('000' + originalGetUTCMilliseconds(this), -3) + 'Z'
|
||||
);
|
||||
}
|
||||
}, hasNegativeDateBug || hasSafari51DateBug);
|
||||
|
@ -1348,10 +1394,10 @@
|
|||
// JSON.stringify (15.12.3).
|
||||
var dateToJSONIsSupported = (function () {
|
||||
try {
|
||||
return Date.prototype.toJSON &&
|
||||
new Date(NaN).toJSON() === null &&
|
||||
new Date(negativeDate).toJSON().indexOf(negativeYearString) !== -1 &&
|
||||
Date.prototype.toJSON.call({ // generic
|
||||
return Date.prototype.toJSON
|
||||
&& new Date(NaN).toJSON() === null
|
||||
&& new Date(negativeDate).toJSON().indexOf(negativeYearString) !== -1
|
||||
&& Date.prototype.toJSON.call({ // generic
|
||||
toISOString: function () { return true; }
|
||||
});
|
||||
} catch (e) {
|
||||
|
@ -1405,13 +1451,10 @@
|
|||
// XXX global assignment won't work in embeddings that use
|
||||
// an alternate object for the context.
|
||||
/* global Date: true */
|
||||
/* eslint-disable no-undef */
|
||||
var maxSafeUnsigned32Bit = Math.pow(2, 31) - 1;
|
||||
var hasSafariSignedIntBug = isActualNaN(new Date(1970, 0, 1, 0, 0, 0, maxSafeUnsigned32Bit + 1).getTime());
|
||||
/* eslint-disable no-implicit-globals */
|
||||
// eslint-disable-next-line no-implicit-globals, no-global-assign
|
||||
Date = (function (NativeDate) {
|
||||
/* eslint-enable no-implicit-globals */
|
||||
/* eslint-enable no-undef */
|
||||
// Date.length === 7
|
||||
var DateShim = function Date(Y, M, D, h, m, s, ms) {
|
||||
var length = arguments.length;
|
||||
|
@ -1426,19 +1469,19 @@
|
|||
seconds += sToShift;
|
||||
millis -= sToShift * 1e3;
|
||||
}
|
||||
date = length === 1 && $String(Y) === Y ? // isString(Y)
|
||||
date = length === 1 && $String(Y) === Y // isString(Y)
|
||||
// We explicitly pass it through parse:
|
||||
new NativeDate(DateShim.parse(Y)) :
|
||||
? new NativeDate(DateShim.parse(Y))
|
||||
// We have to manually make calls depending on argument
|
||||
// length here
|
||||
length >= 7 ? new NativeDate(Y, M, D, h, m, seconds, millis) :
|
||||
length >= 6 ? new NativeDate(Y, M, D, h, m, seconds) :
|
||||
length >= 5 ? new NativeDate(Y, M, D, h, m) :
|
||||
length >= 4 ? new NativeDate(Y, M, D, h) :
|
||||
length >= 3 ? new NativeDate(Y, M, D) :
|
||||
length >= 2 ? new NativeDate(Y, M) :
|
||||
length >= 1 ? new NativeDate(Y instanceof NativeDate ? +Y : Y) :
|
||||
new NativeDate();
|
||||
: length >= 7 ? new NativeDate(Y, M, D, h, m, seconds, millis)
|
||||
: length >= 6 ? new NativeDate(Y, M, D, h, m, seconds)
|
||||
: length >= 5 ? new NativeDate(Y, M, D, h, m)
|
||||
: length >= 4 ? new NativeDate(Y, M, D, h)
|
||||
: length >= 3 ? new NativeDate(Y, M, D)
|
||||
: length >= 2 ? new NativeDate(Y, M)
|
||||
: length >= 1 ? new NativeDate(Y instanceof NativeDate ? +Y : Y)
|
||||
: new NativeDate();
|
||||
} else {
|
||||
date = NativeDate.apply(this, arguments);
|
||||
}
|
||||
|
@ -1450,38 +1493,37 @@
|
|||
};
|
||||
|
||||
// 15.9.1.15 Date Time String Format.
|
||||
var isoDateExpression = new RegExp('^' +
|
||||
'(\\d{4}|[+-]\\d{6})' + // four-digit year capture or sign +
|
||||
// 6-digit extended year
|
||||
'(?:-(\\d{2})' + // optional month capture
|
||||
'(?:-(\\d{2})' + // optional day capture
|
||||
'(?:' + // capture hours:minutes:seconds.milliseconds
|
||||
'T(\\d{2})' + // hours capture
|
||||
':(\\d{2})' + // minutes capture
|
||||
'(?:' + // optional :seconds.milliseconds
|
||||
':(\\d{2})' + // seconds capture
|
||||
'(?:(\\.\\d{1,}))?' + // milliseconds capture
|
||||
')?' +
|
||||
'(' + // capture UTC offset component
|
||||
'Z|' + // UTC capture
|
||||
'(?:' + // offset specifier +/-hours:minutes
|
||||
'([-+])' + // sign capture
|
||||
'(\\d{2})' + // hours offset capture
|
||||
':(\\d{2})' + // minutes offset capture
|
||||
')' +
|
||||
')?)?)?)?' +
|
||||
'$');
|
||||
var isoDateExpression = new RegExp('^'
|
||||
+ '(\\d{4}|[+-]\\d{6})' // four-digit year capture or sign + 6-digit extended year
|
||||
+ '(?:-(\\d{2})' // optional month capture
|
||||
+ '(?:-(\\d{2})' // optional day capture
|
||||
+ '(?:' // capture hours:minutes:seconds.milliseconds
|
||||
+ 'T(\\d{2})' // hours capture
|
||||
+ ':(\\d{2})' // minutes capture
|
||||
+ '(?:' // optional :seconds.milliseconds
|
||||
+ ':(\\d{2})' // seconds capture
|
||||
+ '(?:(\\.\\d{1,}))?' // milliseconds capture
|
||||
+ ')?'
|
||||
+ '(' // capture UTC offset component
|
||||
+ 'Z|' // UTC capture
|
||||
+ '(?:' // offset specifier +/-hours:minutes
|
||||
+ '([-+])' // sign capture
|
||||
+ '(\\d{2})' // hours offset capture
|
||||
+ ':(\\d{2})' // minutes offset capture
|
||||
+ ')'
|
||||
+ ')?)?)?)?'
|
||||
+ '$');
|
||||
|
||||
var months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365];
|
||||
|
||||
var dayFromMonth = function dayFromMonth(year, month) {
|
||||
var t = month > 1 ? 1 : 0;
|
||||
return (
|
||||
months[month] +
|
||||
Math.floor((year - 1969 + t) / 4) -
|
||||
Math.floor((year - 1901 + t) / 100) +
|
||||
Math.floor((year - 1601 + t) / 400) +
|
||||
365 * (year - 1970)
|
||||
months[month]
|
||||
+ Math.floor((year - 1969 + t) / 4)
|
||||
- Math.floor((year - 1901 + t) / 100)
|
||||
+ Math.floor((year - 1601 + t) / 400)
|
||||
+ (365 * (year - 1970))
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -1511,9 +1553,7 @@
|
|||
UTC: NativeDate.UTC
|
||||
}, true);
|
||||
DateShim.prototype = NativeDate.prototype;
|
||||
defineProperties(DateShim.prototype, {
|
||||
constructor: DateShim
|
||||
}, true);
|
||||
defineProperties(DateShim.prototype, { constructor: DateShim }, true);
|
||||
|
||||
// Upgrade Date.parse to handle simplified ISO 8601 strings
|
||||
var parseShim = function parse(string) {
|
||||
|
@ -1539,22 +1579,22 @@
|
|||
result;
|
||||
var hasMinutesOrSecondsOrMilliseconds = minute > 0 || second > 0 || millisecond > 0;
|
||||
if (
|
||||
hour < (hasMinutesOrSecondsOrMilliseconds ? 24 : 25) &&
|
||||
minute < 60 && second < 60 && millisecond < 1000 &&
|
||||
month > -1 && month < 12 && hourOffset < 24 &&
|
||||
minuteOffset < 60 && // detect invalid offsets
|
||||
day > -1 &&
|
||||
day < (dayFromMonth(year, month + 1) - dayFromMonth(year, month))
|
||||
hour < (hasMinutesOrSecondsOrMilliseconds ? 24 : 25)
|
||||
&& minute < 60 && second < 60 && millisecond < 1000
|
||||
&& month > -1 && month < 12 && hourOffset < 24
|
||||
&& minuteOffset < 60 // detect invalid offsets
|
||||
&& day > -1
|
||||
&& day < (dayFromMonth(year, month + 1) - dayFromMonth(year, month))
|
||||
) {
|
||||
result = (
|
||||
(dayFromMonth(year, month) + day) * 24 +
|
||||
hour +
|
||||
hourOffset * signOffset
|
||||
((dayFromMonth(year, month) + day) * 24)
|
||||
+ hour
|
||||
+ (hourOffset * signOffset)
|
||||
) * 60;
|
||||
result = (
|
||||
(result + minute + minuteOffset * signOffset) * 60 +
|
||||
second
|
||||
) * 1000 + millisecond;
|
||||
result = ((
|
||||
((result + minute + (minuteOffset * signOffset)) * 60)
|
||||
+ second
|
||||
) * 1000) + millisecond;
|
||||
if (isLocalTime) {
|
||||
result = toUTC(result);
|
||||
}
|
||||
|
@ -1589,10 +1629,10 @@
|
|||
// ES5.1 15.7.4.5
|
||||
// http://es5.github.com/#x15.7.4.5
|
||||
var hasToFixedBugs = NumberPrototype.toFixed && (
|
||||
(0.00008).toFixed(3) !== '0.000' ||
|
||||
(0.9).toFixed(0) !== '1' ||
|
||||
(1.255).toFixed(2) !== '1.25' ||
|
||||
(1000000000000000128).toFixed(0) !== '1000000000000000128'
|
||||
(0.00008).toFixed(3) !== '0.000'
|
||||
|| (0.9).toFixed(0) !== '1'
|
||||
|| (1.255).toFixed(2) !== '1.25'
|
||||
|| (1000000000000000128).toFixed(0) !== '1000000000000000128'
|
||||
);
|
||||
|
||||
var toFixedHelpers = {
|
||||
|
@ -1770,12 +1810,12 @@
|
|||
// '.'.split(/()()/) should be ["."], not ["", "", "."]
|
||||
|
||||
if (
|
||||
'ab'.split(/(?:ab)*/).length !== 2 ||
|
||||
'.'.split(/(.?)(.?)/).length !== 4 ||
|
||||
'tesst'.split(/(s)*/)[1] === 't' ||
|
||||
'test'.split(/(?:)/, -1).length !== 4 ||
|
||||
''.split(/.?/).length ||
|
||||
'.'.split(/()()/).length > 1
|
||||
'ab'.split(/(?:ab)*/).length !== 2
|
||||
|| '.'.split(/(.?)(.?)/).length !== 4
|
||||
|| 'tesst'.split(/(s)*/)[1] === 't'
|
||||
|| 'test'.split(/(?:)/, -1).length !== 4
|
||||
|| ''.split(/.?/).length
|
||||
|| '.'.split(/()()/).length > 1
|
||||
) {
|
||||
(function () {
|
||||
var compliantExecNpcg = typeof (/()??/).exec('')[1] === 'undefined'; // NPCG: nonparticipating capturing group
|
||||
|
@ -1793,10 +1833,10 @@
|
|||
}
|
||||
|
||||
var output = [];
|
||||
var flags = (separator.ignoreCase ? 'i' : '') +
|
||||
(separator.multiline ? 'm' : '') +
|
||||
(separator.unicode ? 'u' : '') + // in ES6
|
||||
(separator.sticky ? 'y' : ''), // Firefox 3+ and ES6
|
||||
var flags = (separator.ignoreCase ? 'i' : '')
|
||||
+ (separator.multiline ? 'm' : '')
|
||||
+ (separator.unicode ? 'u' : '') // in ES6
|
||||
+ (separator.sticky ? 'y' : ''), // Firefox 3+ and ES6
|
||||
lastLastIndex = 0,
|
||||
// Make `global` and avoid `lastIndex` issues by working with a copy
|
||||
separator2, match, lastIndex, lastLength;
|
||||
|
@ -1921,9 +1961,9 @@
|
|||
|
||||
// ES5 15.5.4.20
|
||||
// whitespace from: http://es5.github.io/#x15.5.4.20
|
||||
var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
|
||||
'\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' +
|
||||
'\u2029\uFEFF';
|
||||
var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003'
|
||||
+ '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028'
|
||||
+ '\u2029\uFEFF';
|
||||
var zeroWidth = '\u200b';
|
||||
var wsRegexChars = '[' + ws + ']';
|
||||
var trimBeginRegexp = new RegExp('^' + wsRegexChars + wsRegexChars + '*');
|
||||
|
@ -1973,13 +2013,18 @@
|
|||
}, StringPrototype.lastIndexOf.length !== 1);
|
||||
|
||||
// ES-5 15.1.2.2
|
||||
/* eslint-disable radix */
|
||||
// eslint-disable-next-line radix
|
||||
if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22) {
|
||||
/* eslint-enable radix */
|
||||
/* global parseInt: true */
|
||||
parseInt = (function (origParseInt) {
|
||||
var hexRegex = /^[\-+]?0[xX]/;
|
||||
var hexRegex = /^[-+]?0[xX]/;
|
||||
return function parseInt(str, radix) {
|
||||
if (typeof str === 'symbol') {
|
||||
// handle Symbols in node 8.3/8.4
|
||||
// eslint-disable-next-line no-implicit-coercion, no-unused-expressions
|
||||
'' + str; // jscs:ignore disallowImplicitTypeConversion
|
||||
}
|
||||
|
||||
var string = trim(String(str));
|
||||
var defaultedRadix = $Number(radix) || (hexRegex.test(string) ? 16 : 10);
|
||||
return origParseInt(string, defaultedRadix);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue