Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var atShim = function at(pos) {
ES.RequireObjectCoercible(this);
var O = ES.ToObject(this);
var S = ES.ToString(O);
var position = ES.ToInteger(pos);
var size = S.length;
if (position < 0 || position >= size) {
return '';
}
// Get the first code unit and code unit value
var cuFirst = S.charCodeAt(position);
var cuSecond;
var nextIndex = position + 1;
var len = 1;
// Check if it’s the start of a surrogate pair.
var isHighSurrogate = cuFirst >= 0xD800 && cuFirst <= 0xDBFF;
if (isHighSurrogate && size > nextIndex /* there is a next code unit */) {
cuSecond = S.charCodeAt(nextIndex);
var boundIncludesShim = function includes(array, searchElement) {
/* eslint-enable no-unused-vars */
ES.RequireObjectCoercible(array);
return polyfill.apply(array, slice.call(arguments, 1));
};
define(boundIncludesShim, {
module.exports = function padEnd(maxLength) {
var O = ES.RequireObjectCoercible(this);
var S = ES.ToString(O);
var stringLength = ES.ToLength(S.length);
var fillString;
if (arguments.length > 1) {
fillString = arguments[1];
}
var filler = typeof fillString === 'undefined' ? '' : ES.ToString(fillString);
if (filler === '') {
filler = ' ';
}
var intMaxLength = ES.ToLength(maxLength);
if (intMaxLength <= stringLength) {
return S;
}
var fillLen = intMaxLength - stringLength;
while (filler.length < fillLen) {
var boundShim = function findIndex(array, predicate) {
ES.RequireObjectCoercible(array);
var args = slice.call(arguments, 1);
return polyfill.apply(array, args);
};
var boundPadStart = function padStart(str, maxLength) {
ES.RequireObjectCoercible(str);
var args = [maxLength];
if (arguments.length > 2) {
args.push(arguments[2]);
}
return bound(str, args);
};
module.exports = function getOwnPropertyDescriptors(value) {
ES.RequireObjectCoercible(value);
if (!isES5) {
throw new TypeError('getOwnPropertyDescriptors requires Object.getOwnPropertyDescriptor');
}
var O = ES.ToObject(value);
return reduce(getAll(O), function (acc, key) {
var descriptor = getDescriptor(O, key);
if (typeof descriptor !== 'undefined') {
safePut(acc, key, descriptor);
}
return acc;
}, {});
};
module.exports = function entries(O) {
var obj = ES.RequireObjectCoercible(O);
var entrys = [];
for (var key in obj) {
if (has(obj, key) && isEnumerable(obj, key)) {
entrys.push([key, obj[key]]);
}
}
return entrys;
};
module.exports = function values(O) {
var obj = ES.RequireObjectCoercible(O);
var vals = [];
for (var key in obj) {
if (has(obj, key) && isEnumerable(obj, key)) {
vals.push(obj[key]);
}
}
return vals;
};
var boundPadEnd = function padEnd(str, maxLength) {
ES.RequireObjectCoercible(str);
var args = [maxLength];
if (arguments.length > 2) {
args.push(arguments[2]);
}
return bound(str, args);
};
module.exports = function padStart(maxLength) {
var O = ES.RequireObjectCoercible(this);
var S = ES.ToString(O);
var stringLength = ES.ToLength(S.length);
var fillString;
if (arguments.length > 1) {
fillString = arguments[1];
}
var filler = typeof fillString === 'undefined' ? '' : ES.ToString(fillString);
if (filler === '') {
filler = ' ';
}
var intMaxLength = ES.ToLength(maxLength);
if (intMaxLength <= stringLength) {
return S;
}
var fillLen = intMaxLength - stringLength;
while (filler.length < fillLen) {