Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

fastestsmallesttextencoderdecoder

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastestsmallesttextencoderdecoder - npm Package Compare versions

Comparing version 1.0.15 to 1.0.16

2

EncoderDecoderTogether.min.js
'use strict';(function(f){function r(b){var a=b.charCodeAt(0)<<24,c=t(~a)|0,d=0,m=b.length|0,g="";if(5>c&&m>=c){a=a<<c>>>24+c;for(d=1;d<c;d=d+1|0)a=a<<6|b.charCodeAt(d)&63;65535>=a?g+=e(a):1114111>=a?(a=a-65536|0,g+=e((a>>10)+55296|0,(a&1023)+56320|0)):d=0}for(;d<m;d=d+1|0)g+="\ufffd";return g}function n(){}function u(b){var a=b.charCodeAt(0)|0;if(55296<=a&&56319>=a){var c=b.charCodeAt(1)|0;if(c===c&&56320<=c&&57343>=c){if(a=(a-55296<<10)+c-56320+65536|0,65535<a)return e(240|a>>>18,128|a>>>12&63,
128|a>>>6&63,128|a&63)}else return e(239,191,189)}return 127>=a?b:2047>=a?e(192|a>>>6,128|a&63):e(224|a>>>12,128|a>>>6&63,128|a&63)}function p(){}var v=Math.log,w=Math.LN2,t=Math.clz32||function(b){return 31-v(b>>>0)/w|0},e=String.fromCharCode,k={}.toString,q=f.SharedArrayBuffer,x=q?k.call(q):"",h=f.Uint8Array,l=h||Array,y=k.call((h?ArrayBuffer:l).prototype);n.prototype.decode=function(b){var a=b&&b.buffer||b,c=k.call(a);if(c!==y&&c!==x||void 0===b)throw Error("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");
128|a>>>6&63,128|a&63)}else return e(239,191,189)}return 127>=a?b:2047>=a?e(192|a>>>6,128|a&63):e(224|a>>>12,128|a>>>6&63,128|a&63)}function p(){}var v=Math.log,w=Math.LN2,t=Math.clz32||function(b){return 31-v(b>>>0)/w|0},e=String.fromCharCode,k={}.toString,q=f.SharedArrayBuffer,x=q?k.call(q):"",h=f.Uint8Array,l=h||Array,y=k.call((h?ArrayBuffer:l).prototype);n.prototype.decode=function(b){var a=b&&b.buffer||b,c=k.call(a);if(c!==y&&c!==x&&void 0!==b)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");
b=h?new l(a):a;a="";c=0;for(var d=b.length|0;c<d;c=c+32768|0)a+=e.apply(0,b[h?"subarray":"slice"](c,c+32768|0));return a.replace(/[\xc0-\xff][\x80-\xbf]*/g,r)};f.TextDecoder||(f.TextDecoder=n);p.prototype.encode=function(b){b=void 0===b?"":(""+b).replace(/[\x80-\uD7ff\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,u);for(var a=b.length|0,c=new l(a),d=0;d<a;d=d+1|0)c[d]=b.charCodeAt(d);return c};f.TextEncoder||(f.TextEncoder=p)})(""+void 0==typeof global?""+void 0==typeof self?this:self:global);//AnonyCo
//# sourceMappingURL=EncoderDecoderTogether.min.js.map
'use strict';(function(f){var B=Math.log,C=Math.LN2,D=Math.clz32||function(b){return 31-B(b>>>0)/C|0},g=String.fromCharCode,k={}.toString,q=f.SharedArrayBuffer,E=q?k.call(q):"",h=f.Uint8Array,F=h?k.call(ArrayBuffer.prototype):"",e=f.Buffer;try{!e&&f.require&&(e=f.require("Buffer"));var r=e.prototype,G=e?k.call(r):""}catch(b){}var t=!!h&&!e,u=!e||!!h&&h.prototype.isPrototypeOf(r);if(t||e){var l=function(b){b.TextEncoder=n||v;b.TextDecoder=p||w;b!==f&&(b.encode=n?x(new n,"encode"):y,b.decode=p?x(new p,
"decode"):z);return b},x=function(b,a,c){c=b[a];return function(){c.apply(b,arguments)}},y=function(b){b=void 0===b?"":(""+b).replace(/[\x80-\uD7ff\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,H);for(var a=b.length|0,c=t?new h(a):e.allocUnsafe?e.allocUnsafe(a):new e(a),d=0;d<a;d=d+1|0)c[d]=b.charCodeAt(d)|0;return c},v=function(){},H=function(b){var a=b.charCodeAt(0)|0;if(55296<=a&&56319>=a){var c=b.charCodeAt(1)|0;if(c===c&&56320<=c&&57343>=c){if(a=(a-55296<<10)+c-56320+65536|0,65535<a)return g(240|
a>>>18,128|a>>>12&63,128|a>>>6&63,128|a&63)}else return g(239,191,189)}return 127>=a?b:2047>=a?g(192|a>>>6,128|a&63):g(224|a>>>12,128|a>>>6&63,128|a&63)},z=function(b){var a=b&&b.buffer||b,c=k.call(a);if(c!==F&&c!==G&&c!==E&&"[object ArrayBuffer]"!==c||void 0===b)throw Error("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");b=u?new h(a):a;a="";c=0;for(var d=b.length|0;c<d;c=c+32768|0)a+=g.apply(0,b[u?"subarray":"slice"](c,c+32768|
0));return a.replace(/[\xc0-\xff][\x80-\xbf]*/g,I)},w=function(){},I=function(b){var a=b.charCodeAt(0)<<24,c=D(~a)|0,d=0,A=b.length|0,m="";if(5>c&&A>=c){a=a<<c>>>24+c;for(d=1;d<c;d=d+1|0)a=a<<6|b.charCodeAt(d)&63;65535>=a?m+=g(a):1114111>=a?(a=a-65536|0,m+=g((a>>10)+55296|0,(a&1023)+56320|0)):d=0}for(;d<A;d=d+1|0)m+="\ufffd";return m};w.prototype.decode=z;v.prototype.encode=y;var n=f.TextEncoder,p=f.TextDecoder;"object"===typeof exports&&"undefined"!==typeof module?l(module.exports):typeof define==
a>>>18,128|a>>>12&63,128|a>>>6&63,128|a&63)}else return g(239,191,189)}return 127>=a?b:2047>=a?g(192|a>>>6,128|a&63):g(224|a>>>12,128|a>>>6&63,128|a&63)},z=function(b){var a=b&&b.buffer||b,c=k.call(a);if(c!==F&&c!==G&&c!==E&&"[object ArrayBuffer]"!==c&&void 0!==b)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");b=u?new h(a):a||[];a="";c=0;for(var d=b.length|0;c<d;c=c+32768|0)a+=g.apply(0,b[u?"subarray":"slice"](c,
c+32768|0));return a.replace(/[\xc0-\xff][\x80-\xbf]*/g,I)},w=function(){},I=function(b){var a=b.charCodeAt(0)<<24,c=D(~a)|0,d=0,A=b.length|0,m="";if(5>c&&A>=c){a=a<<c>>>24+c;for(d=1;d<c;d=d+1|0)a=a<<6|b.charCodeAt(d)&63;65535>=a?m+=g(a):1114111>=a?(a=a-65536|0,m+=g((a>>10)+55296|0,(a&1023)+56320|0)):d=0}for(;d<A;d=d+1|0)m+="\ufffd";return m};w.prototype.decode=z;v.prototype.encode=y;var n=f.TextEncoder,p=f.TextDecoder;"object"===typeof exports&&"undefined"!==typeof module?l(module.exports):typeof define==
typeof l&&define.amd?define(function(){return l({})}):l(f)}})("undefined"==typeof global?"undefined"==typeof self?this||{}:self:global);//AnonyCo
//# sourceMappingURL=EncoderAndDecoderNodeJS.min.js.map
'use strict';var e="undefined"==typeof global?"undefined"===typeof self?{}:self:global,f=Math.log,g=Math.LN2,h=Math.clz32||function(b){return 31-f(b>>>0)/g|0},k=String.fromCharCode,m={}.toString,n=e.SharedArrayBuffer,p=n?m.call(n):"",q=e.Uint8Array,r=q?m.call(ArrayBuffer.prototype):"",u=e.Buffer;try{!u&&e.require&&(u=e.require("Buffer"));var v=u.prototype,w=m.call(v)}catch(b){}var x=!!q&&!u,y=!u||!!q&&q.prototype.isPrototypeOf(v);
function z(b){var a=b.charCodeAt(0)<<24,c=h(~a)|0,d=0,t=b.length|0,l="";if(5>c&&t>=c){a=a<<c>>>24+c;for(d=1;d<c;d=d+1|0)a=a<<6|b.charCodeAt(d)&63;65535>=a?l+=k(a):1114111>=a?(a=a-65536|0,l+=k((a>>10)+55296|0,(a&1023)+56320|0)):d=0}for(;d<t;d=d+1|0)l+="\ufffd";return l}function A(){}
function B(b){var a=b&&b.buffer||b,c=m.call(a);if(c!==r&&c!==w&&c!==p&&"[object ArrayBuffer]"!==c||void 0===b)throw Error("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");b=y?new q(a):a;a="";c=0;for(var d=b.length|0;c<d;c=c+32768|0)a+=k.apply(0,b[y?"subarray":"slice"](c,c+32768|0));return a.replace(/[\xc0-\xff][\x80-\xbf]*/g,z)}A.prototype.decode=B;
function B(b){var a=b&&b.buffer||b,c=m.call(a);if(c!==r&&c!==w&&c!==p&&"[object ArrayBuffer]"!==c&&void 0!==b)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");b=y?new q(a):a||[];a="";c=0;for(var d=b.length|0;c<d;c=c+32768|0)a+=k.apply(0,b[y?"subarray":"slice"](c,c+32768|0));return a.replace(/[\xc0-\xff][\x80-\xbf]*/g,z)}A.prototype.decode=B;
function C(b){var a=b.charCodeAt(0)|0;if(55296<=a&&56319>=a){var c=b.charCodeAt(1)|0;if(c===c&&56320<=c&&57343>=c){if(a=(a-55296<<10)+c-56320+65536|0,65535<a)return k(240|a>>>18,128|a>>>12&63,128|a>>>6&63,128|a&63)}else return k(239,191,189)}return 127>=a?b:2047>=a?k(192|a>>>6,128|a&63):k(224|a>>>12,128|a>>>6&63,128|a&63)}function D(){}

@@ -5,0 +5,0 @@ function E(b){b=void 0===b?"":(""+b).replace(/[\x80-\uD7ff\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,C);for(var a=b.length|0,c=x?new q(a):u.allocUnsafe?u.allocUnsafe(a):new u(a),d=0;d<a;d=d+1|0)c[d]=b.charCodeAt(d)|0;return c}D.prototype.encode=E;var F=e.TextDecoder,G=e.TextEncoder;function H(b,a){var c=b[a];return function(){c.apply(b,arguments)}}export var TextEncoder=G||D;export var TextDecoder=F||A;export var encode=G?H(new G,"encode"):E;

{
"name": "fastestsmallesttextencoderdecoder",
"version": "1.0.15",
"version": "1.0.16",
"description": "The fastest smallest Javascript polyfill for the encode of TextEncoder and decode of TextDecoder for UTF-8 only. Made by AnonyCo with ❤️ from 🐕s.",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc