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.
Files changed (82) hide show
  1. package/CHANGELOG.md +4 -4
  2. package/README.md +41 -0
  3. package/package.json +10 -21
  4. package/polyfills/__dist/Array.prototype.sort/meta.json +1 -1
  5. package/polyfills/__dist/Array.prototype.sort/min.js +1 -1
  6. package/polyfills/__dist/Array.prototype.sort/raw.js +20 -9
  7. package/polyfills/__dist/Array.prototype.toReversed/meta.json +1 -0
  8. package/polyfills/__dist/Array.prototype.toReversed/min.js +1 -0
  9. package/polyfills/__dist/Array.prototype.toReversed/raw.js +29 -0
  10. package/polyfills/__dist/Array.prototype.toSorted/meta.json +1 -0
  11. package/polyfills/__dist/Array.prototype.toSorted/min.js +1 -0
  12. package/polyfills/__dist/Array.prototype.toSorted/raw.js +37 -0
  13. package/polyfills/__dist/Array.prototype.toSpliced/meta.json +1 -0
  14. package/polyfills/__dist/Array.prototype.toSpliced/min.js +1 -0
  15. package/polyfills/__dist/Array.prototype.toSpliced/raw.js +96 -0
  16. package/polyfills/__dist/Array.prototype.with/meta.json +1 -0
  17. package/polyfills/__dist/Array.prototype.with/min.js +1 -0
  18. package/polyfills/__dist/Array.prototype.with/raw.js +60 -0
  19. package/polyfills/__dist/HTMLFormElement.prototype.requestSubmit/meta.json +1 -0
  20. package/polyfills/__dist/HTMLFormElement.prototype.requestSubmit/min.js +1 -0
  21. package/polyfills/__dist/HTMLFormElement.prototype.requestSubmit/raw.js +116 -0
  22. package/polyfills/__dist/IntersectionObserver/meta.json +1 -1
  23. package/polyfills/__dist/IntersectionObserver/min.js +1 -1
  24. package/polyfills/__dist/IntersectionObserver/raw.js +2 -1
  25. package/polyfills/__dist/IntersectionObserverEntry/meta.json +1 -1
  26. package/polyfills/__dist/Intl.DateTimeFormat.~locale.en-US-POSIX/meta.json +1 -1
  27. package/polyfills/__dist/Intl.NumberFormat.~locale.he/meta.json +1 -1
  28. package/polyfills/__dist/Intl.NumberFormat.~locale.id/meta.json +1 -1
  29. package/polyfills/__dist/Intl.NumberFormat.~locale.jv/meta.json +1 -1
  30. package/polyfills/__dist/Intl.NumberFormat.~locale.sr-Latn/meta.json +1 -1
  31. package/polyfills/__dist/Intl.NumberFormat.~locale.sr-Latn-BA/meta.json +1 -1
  32. package/polyfills/__dist/Intl.NumberFormat.~locale.sr-Latn-ME/meta.json +1 -1
  33. package/polyfills/__dist/Intl.NumberFormat.~locale.sr-Latn-XK/meta.json +1 -1
  34. package/polyfills/__dist/Intl.RelativeTimeFormat.~locale.en-US-POSIX/meta.json +1 -1
  35. package/polyfills/__dist/Intl.RelativeTimeFormat.~locale.he/meta.json +1 -1
  36. package/polyfills/__dist/Intl.RelativeTimeFormat.~locale.id/meta.json +1 -1
  37. package/polyfills/__dist/Intl.RelativeTimeFormat.~locale.jv/meta.json +1 -1
  38. package/polyfills/__dist/Intl.RelativeTimeFormat.~locale.sr-Latn/meta.json +1 -1
  39. package/polyfills/__dist/Intl.RelativeTimeFormat.~locale.sr-Latn-BA/meta.json +1 -1
  40. package/polyfills/__dist/Intl.RelativeTimeFormat.~locale.sr-Latn-ME/meta.json +1 -1
  41. package/polyfills/__dist/Intl.RelativeTimeFormat.~locale.sr-Latn-XK/meta.json +1 -1
  42. package/polyfills/__dist/ResizeObserver/min.js +1 -1
  43. package/polyfills/__dist/ResizeObserver/raw.js +5 -5
  44. package/polyfills/__dist/TypedArray.prototype.@@toStringTag/raw.js +1 -1
  45. package/polyfills/__dist/TypedArray.prototype.at/raw.js +1 -1
  46. package/polyfills/__dist/TypedArray.prototype.entries/meta.json +1 -1
  47. package/polyfills/__dist/TypedArray.prototype.entries/min.js +1 -1
  48. package/polyfills/__dist/TypedArray.prototype.entries/raw.js +21 -25
  49. package/polyfills/__dist/TypedArray.prototype.findLast/meta.json +1 -1
  50. package/polyfills/__dist/TypedArray.prototype.findLast/min.js +1 -1
  51. package/polyfills/__dist/TypedArray.prototype.findLast/raw.js +12 -11
  52. package/polyfills/__dist/TypedArray.prototype.findLastIndex/meta.json +1 -1
  53. package/polyfills/__dist/TypedArray.prototype.findLastIndex/min.js +1 -1
  54. package/polyfills/__dist/TypedArray.prototype.findLastIndex/raw.js +12 -11
  55. package/polyfills/__dist/TypedArray.prototype.keys/meta.json +1 -1
  56. package/polyfills/__dist/TypedArray.prototype.keys/min.js +1 -1
  57. package/polyfills/__dist/TypedArray.prototype.keys/raw.js +21 -25
  58. package/polyfills/__dist/TypedArray.prototype.sort/meta.json +1 -0
  59. package/polyfills/__dist/TypedArray.prototype.sort/min.js +1 -0
  60. package/polyfills/__dist/TypedArray.prototype.sort/raw.js +71 -0
  61. package/polyfills/__dist/TypedArray.prototype.toReversed/meta.json +1 -0
  62. package/polyfills/__dist/TypedArray.prototype.toReversed/min.js +1 -0
  63. package/polyfills/__dist/TypedArray.prototype.toReversed/raw.js +50 -0
  64. package/polyfills/__dist/TypedArray.prototype.toSorted/meta.json +1 -0
  65. package/polyfills/__dist/TypedArray.prototype.toSorted/min.js +1 -0
  66. package/polyfills/__dist/TypedArray.prototype.toSorted/raw.js +59 -0
  67. package/polyfills/__dist/TypedArray.prototype.with/meta.json +1 -0
  68. package/polyfills/__dist/TypedArray.prototype.with/min.js +1 -0
  69. package/polyfills/__dist/TypedArray.prototype.with/raw.js +83 -0
  70. package/polyfills/__dist/_ESAbstract.IsValidIntegerIndex/meta.json +1 -0
  71. package/polyfills/__dist/_ESAbstract.IsValidIntegerIndex/min.js +1 -0
  72. package/polyfills/__dist/_ESAbstract.IsValidIntegerIndex/raw.js +16 -0
  73. package/polyfills/__dist/_ESAbstract.TypedArrayCreate/meta.json +1 -0
  74. package/polyfills/__dist/_ESAbstract.TypedArrayCreate/min.js +1 -0
  75. package/polyfills/__dist/_ESAbstract.TypedArrayCreate/raw.js +20 -0
  76. package/polyfills/__dist/_ESAbstract.TypedArrayCreateSameType/meta.json +1 -0
  77. package/polyfills/__dist/_ESAbstract.TypedArrayCreateSameType/min.js +1 -0
  78. package/polyfills/__dist/_ESAbstract.TypedArrayCreateSameType/raw.js +41 -0
  79. package/polyfills/__dist/aliases.json +1 -1
  80. package/polyfills/__dist/atob/meta.json +1 -1
  81. package/polyfills/__dist/atob/min.js +1 -1
  82. 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":1089}
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),i=0,f=r,c="";a.charAt(0|i)||(f="=",i%1);c+=f.charAt(63&o>>8-i%1*8)){if((n=a.charCodeAt(i+=.75))>255)throw new e("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");o=o<<8|n}return c}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,i=0,f=0,c="";a=o.charAt(f++);~a&&(n=i%4?64*n+a:a,i++%4)?c+=String.fromCharCode(255&n>>(-2*i&6)):0)a=r.indexOf(a);return c}var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return e.prototype=new Error,e.prototype.name="InvalidCharacterError",{btoa:t,atob:o}});
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 str = String (input);
36
- for (
37
- // initialize result and counter
38
- var block, charCode, idx = 0, map = chars, output = '';
39
- // if the next str index does not exist:
40
- // change the mapping table to "="
41
- // check if d has no fractional digits
42
- str.charAt (idx | 0) || (map = '=', idx % 1);
43
- // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8
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
- block = block << 8 | charCode;
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