polyfill-library 4.7.0 → 4.8.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +4 -4
- package/README.md +41 -0
- package/package.json +10 -21
- package/polyfills/__dist/Array.prototype.sort/meta.json +1 -1
- package/polyfills/__dist/Array.prototype.sort/min.js +1 -1
- package/polyfills/__dist/Array.prototype.sort/raw.js +20 -9
- package/polyfills/__dist/Array.prototype.toReversed/meta.json +1 -0
- package/polyfills/__dist/Array.prototype.toReversed/min.js +1 -0
- package/polyfills/__dist/Array.prototype.toReversed/raw.js +29 -0
- package/polyfills/__dist/Array.prototype.toSorted/meta.json +1 -0
- package/polyfills/__dist/Array.prototype.toSorted/min.js +1 -0
- package/polyfills/__dist/Array.prototype.toSorted/raw.js +37 -0
- package/polyfills/__dist/Array.prototype.toSpliced/meta.json +1 -0
- package/polyfills/__dist/Array.prototype.toSpliced/min.js +1 -0
- package/polyfills/__dist/Array.prototype.toSpliced/raw.js +96 -0
- package/polyfills/__dist/Array.prototype.with/meta.json +1 -0
- package/polyfills/__dist/Array.prototype.with/min.js +1 -0
- package/polyfills/__dist/Array.prototype.with/raw.js +60 -0
- package/polyfills/__dist/HTMLFormElement.prototype.requestSubmit/meta.json +1 -0
- package/polyfills/__dist/HTMLFormElement.prototype.requestSubmit/min.js +1 -0
- package/polyfills/__dist/HTMLFormElement.prototype.requestSubmit/raw.js +116 -0
- package/polyfills/__dist/IntersectionObserver/meta.json +1 -1
- package/polyfills/__dist/IntersectionObserver/min.js +1 -1
- package/polyfills/__dist/IntersectionObserver/raw.js +2 -1
- package/polyfills/__dist/IntersectionObserverEntry/meta.json +1 -1
- package/polyfills/__dist/Intl.DateTimeFormat.~locale.en-US-POSIX/meta.json +1 -1
- package/polyfills/__dist/Intl.NumberFormat.~locale.he/meta.json +1 -1
- package/polyfills/__dist/Intl.NumberFormat.~locale.id/meta.json +1 -1
- package/polyfills/__dist/Intl.NumberFormat.~locale.jv/meta.json +1 -1
- package/polyfills/__dist/Intl.NumberFormat.~locale.sr-Latn/meta.json +1 -1
- package/polyfills/__dist/Intl.NumberFormat.~locale.sr-Latn-BA/meta.json +1 -1
- package/polyfills/__dist/Intl.NumberFormat.~locale.sr-Latn-ME/meta.json +1 -1
- package/polyfills/__dist/Intl.NumberFormat.~locale.sr-Latn-XK/meta.json +1 -1
- package/polyfills/__dist/Intl.RelativeTimeFormat.~locale.en-US-POSIX/meta.json +1 -1
- package/polyfills/__dist/Intl.RelativeTimeFormat.~locale.he/meta.json +1 -1
- package/polyfills/__dist/Intl.RelativeTimeFormat.~locale.id/meta.json +1 -1
- package/polyfills/__dist/Intl.RelativeTimeFormat.~locale.jv/meta.json +1 -1
- package/polyfills/__dist/Intl.RelativeTimeFormat.~locale.sr-Latn/meta.json +1 -1
- package/polyfills/__dist/Intl.RelativeTimeFormat.~locale.sr-Latn-BA/meta.json +1 -1
- package/polyfills/__dist/Intl.RelativeTimeFormat.~locale.sr-Latn-ME/meta.json +1 -1
- package/polyfills/__dist/Intl.RelativeTimeFormat.~locale.sr-Latn-XK/meta.json +1 -1
- package/polyfills/__dist/ResizeObserver/min.js +1 -1
- package/polyfills/__dist/ResizeObserver/raw.js +5 -5
- package/polyfills/__dist/TypedArray.prototype.@@toStringTag/raw.js +1 -1
- package/polyfills/__dist/TypedArray.prototype.at/raw.js +1 -1
- package/polyfills/__dist/TypedArray.prototype.entries/meta.json +1 -1
- package/polyfills/__dist/TypedArray.prototype.entries/min.js +1 -1
- package/polyfills/__dist/TypedArray.prototype.entries/raw.js +21 -25
- package/polyfills/__dist/TypedArray.prototype.findLast/meta.json +1 -1
- package/polyfills/__dist/TypedArray.prototype.findLast/min.js +1 -1
- package/polyfills/__dist/TypedArray.prototype.findLast/raw.js +12 -11
- package/polyfills/__dist/TypedArray.prototype.findLastIndex/meta.json +1 -1
- package/polyfills/__dist/TypedArray.prototype.findLastIndex/min.js +1 -1
- package/polyfills/__dist/TypedArray.prototype.findLastIndex/raw.js +12 -11
- package/polyfills/__dist/TypedArray.prototype.keys/meta.json +1 -1
- package/polyfills/__dist/TypedArray.prototype.keys/min.js +1 -1
- package/polyfills/__dist/TypedArray.prototype.keys/raw.js +21 -25
- package/polyfills/__dist/TypedArray.prototype.sort/meta.json +1 -0
- package/polyfills/__dist/TypedArray.prototype.sort/min.js +1 -0
- package/polyfills/__dist/TypedArray.prototype.sort/raw.js +71 -0
- package/polyfills/__dist/TypedArray.prototype.toReversed/meta.json +1 -0
- package/polyfills/__dist/TypedArray.prototype.toReversed/min.js +1 -0
- package/polyfills/__dist/TypedArray.prototype.toReversed/raw.js +50 -0
- package/polyfills/__dist/TypedArray.prototype.toSorted/meta.json +1 -0
- package/polyfills/__dist/TypedArray.prototype.toSorted/min.js +1 -0
- package/polyfills/__dist/TypedArray.prototype.toSorted/raw.js +59 -0
- package/polyfills/__dist/TypedArray.prototype.with/meta.json +1 -0
- package/polyfills/__dist/TypedArray.prototype.with/min.js +1 -0
- package/polyfills/__dist/TypedArray.prototype.with/raw.js +83 -0
- package/polyfills/__dist/_ESAbstract.IsValidIntegerIndex/meta.json +1 -0
- package/polyfills/__dist/_ESAbstract.IsValidIntegerIndex/min.js +1 -0
- package/polyfills/__dist/_ESAbstract.IsValidIntegerIndex/raw.js +16 -0
- package/polyfills/__dist/_ESAbstract.TypedArrayCreate/meta.json +1 -0
- package/polyfills/__dist/_ESAbstract.TypedArrayCreate/min.js +1 -0
- package/polyfills/__dist/_ESAbstract.TypedArrayCreate/raw.js +20 -0
- package/polyfills/__dist/_ESAbstract.TypedArrayCreateSameType/meta.json +1 -0
- package/polyfills/__dist/_ESAbstract.TypedArrayCreateSameType/min.js +1 -0
- package/polyfills/__dist/_ESAbstract.TypedArrayCreateSameType/raw.js +41 -0
- package/polyfills/__dist/aliases.json +1 -1
- package/polyfills/__dist/atob/meta.json +1 -1
- package/polyfills/__dist/atob/min.js +1 -1
- package/polyfills/__dist/atob/raw.js +22 -16
@@ -1 +1 @@
|
|
1
|
-
{"aliases":["default-3.3","default-3.4","default-3.5","default-3.6","default","caniuse:datauri"],"license":"MIT","repo":"http://www.webtoolkit.info/javascript-base64.html","spec":"https://html.spec.whatwg.org/multipage/webappapis.html#dom-windowbase64-atob","docs":"https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/atob","browsers":{"ie":"<10"},"install":{"module":"Base64","paths":["base64.js"]},"detectSource":"\"atob\"in self\n","baseDir":"atob","hasTests":true,"isTestable":true,"isPublic":true,"size":
|
1
|
+
{"aliases":["default-3.3","default-3.4","default-3.5","default-3.6","default","caniuse:datauri"],"license":"MIT","repo":"http://www.webtoolkit.info/javascript-base64.html","spec":"https://html.spec.whatwg.org/multipage/webappapis.html#dom-windowbase64-atob","docs":"https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/atob","browsers":{"ie":"<10"},"install":{"module":"Base64","paths":["base64.js"]},"detectSource":"\"atob\"in self\n","baseDir":"atob","hasTests":true,"isTestable":true,"isPublic":true,"size":1270}
|
@@ -1 +1 @@
|
|
1
|
-
!function(e){"use strict";if("object"==typeof exports&&null!=exports&&"number"!=typeof exports.nodeType)module.exports=e();else if("function"==typeof define&&null!=define.amd)define([],e);else{var t=e(),o="undefined"!=typeof self?self:$.global;"function"!=typeof o.btoa&&(o.btoa=t.btoa),"function"!=typeof o.atob&&(o.atob=t.atob)}}(function(){"use strict";function e(e){this.message=e}function t(t){for(var o,n,a=String(t),
|
1
|
+
!function(e){"use strict";if("object"==typeof exports&&null!=exports&&"number"!=typeof exports.nodeType)module.exports=e();else if("function"==typeof define&&null!=define.amd)define([],e);else{var t=e(),o="undefined"!=typeof self?self:$.global;"function"!=typeof o.btoa&&(o.btoa=t.btoa),"function"!=typeof o.atob&&(o.atob=t.atob)}}(function(){"use strict";function e(e){this.message=e}function t(t){for(var o,n,a,c,i=String(t),f=0,s="";f<i.length;){if(o=i.charCodeAt(f++),n=i.charCodeAt(f++),a=i.charCodeAt(f++),o>128||n>128||a>128)throw new e("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");c=o<<16|n<<8|a,s+=r.charAt(c>>18&63)+r.charAt(c>>12&63)+r.charAt(c>>6&63)+r.charAt(63&c)}switch(i.length%3){case 0:return s;case 1:return s.slice(0,-2)+"==";case 2:return s.slice(0,-1)+"="}}function o(t){var o=String(t).replace(/[=]+$/,"");if(o.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,a,c=0,i=0,f="";a=o.charAt(i++);~a&&(n=c%4?64*n+a:a,c++%4)?f+=String.fromCharCode(255&n>>(-2*c&6)):0)a=r.indexOf(a);return f}var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return e.prototype=new Error,e.prototype.name="InvalidCharacterError",{btoa:t,atob:o}});
|
@@ -30,26 +30,32 @@
|
|
30
30
|
InvalidCharacterError.prototype.name = 'InvalidCharacterError';
|
31
31
|
|
32
32
|
// encoder
|
33
|
-
// [https://gist.github.com/999166] by [https://github.com/nignag]
|
34
33
|
function btoa(input) {
|
35
|
-
var
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
output += map.charAt (63 & block >> 8 - idx % 1 * 8)
|
45
|
-
) {
|
46
|
-
charCode = str.charCodeAt (idx += 3 / 4);
|
47
|
-
if (charCode > 0xFF) {
|
34
|
+
var data = String (input), o1, o2, o3, bits, i = 0, acc = '';
|
35
|
+
|
36
|
+
while (i < data.length) {
|
37
|
+
// pack three octets into four hextets
|
38
|
+
o1 = data.charCodeAt (i++);
|
39
|
+
o2 = data.charCodeAt (i++);
|
40
|
+
o3 = data.charCodeAt (i++);
|
41
|
+
|
42
|
+
if (o1 > 128 || o2 > 128 || o3 > 128) {
|
48
43
|
throw new InvalidCharacterError ("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");
|
49
44
|
}
|
50
|
-
|
45
|
+
|
46
|
+
bits = (o1 << 16) | (o2 << 8) | o3;
|
47
|
+
// use hextets to index into b64, and append result to encoded string
|
48
|
+
acc += chars.charAt ((bits >> 18) & 0x3F) +
|
49
|
+
chars.charAt ((bits >> 12) & 0x3F) +
|
50
|
+
chars.charAt ((bits >> 6) & 0x3F) +
|
51
|
+
chars.charAt ((bits) & 0x3F);
|
52
|
+
}
|
53
|
+
|
54
|
+
switch (data.length % 3) {
|
55
|
+
case 0: return acc;
|
56
|
+
case 1: return acc.slice (0, -2) + '==';
|
57
|
+
case 2: return acc.slice (0, -1) + '=';
|
51
58
|
}
|
52
|
-
return output;
|
53
59
|
}
|
54
60
|
|
55
61
|
// decoder
|