Socket
Socket
Sign inDemoInstall

efrt

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

efrt - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

builds/efrt.js

2

builds/efrt-unpack.min.js

@@ -1,1 +0,1 @@

"use strict";const BASE=36,seq="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",cache=seq.split("").reduce(function(n,o,e){return n[o]=e,n},{}),toAlphaCode=function(n){if(void 0!==seq[n])return seq[n];let o=1,e=36,t="";for(;n>=e;n-=e,o++,e*=36);for(;o--;){const o=n%36;t=String.fromCharCode((o<10?48:55)+o)+t,n=(n-o)/36}return t},fromAlphaCode=function(n){if(void 0!==cache[n])return cache[n];let o=0,e=1,t=36,r=1;for(;e<n.length;o+=t,e++,t*=36);for(let e=n.length-1;e>=0;e--,r*=36){let t=n.charCodeAt(e)-48;t>10&&(t-=7),o+=t*r}return o};var encoding={toAlphaCode:toAlphaCode,fromAlphaCode:fromAlphaCode},symbols=function(n){const o=new RegExp("([0-9A-Z]+):([0-9A-Z]+)");for(let e=0;e<n.nodes.length;e++){const t=o.exec(n.nodes[e]);if(!t){n.symCount=e;break}n.syms[encoding.fromAlphaCode(t[1])]=encoding.fromAlphaCode(t[2])}n.nodes=n.nodes.slice(n.symCount,n.nodes.length)};const indexFromRef=function(n,o,e){const t=encoding.fromAlphaCode(o);return t<n.symCount?n.syms[t]:e+t+1-n.symCount},toArray=function(n){const o=[],e=(t,r)=>{let s=n.nodes[t];"!"===s[0]&&(o.push(r),s=s.slice(1));const c=s.split(/([A-Z0-9,]+)/g);for(let s=0;s<c.length;s+=2){const u=c[s],i=c[s+1];if(!u)continue;const l=r+u;if(","===i||void 0===i){o.push(l);continue}const f=indexFromRef(n,i,t);e(f,l)}};return e(0,""),o},unpack=function(n){const o={nodes:n.split(";"),syms:[],symCount:0};return n.match(":")&&symbols(o),toArray(o)};var unpack_1=unpack,unpack_1$1=function(n){const o=n.split("|").reduce((n,o)=>{const e=o.split("¦");return n[e[0]]=e[1],n},{}),e={};return Object.keys(o).forEach(function(n){const t=unpack_1(o[n]);"true"===n&&(n=!0);for(let o=0;o<t.length;o++){const r=t[o];!0===e.hasOwnProperty(r)?!1===Array.isArray(e[r])?e[r]=[e[r],n]:e[r].push(n):e[r]=n}}),e};module.exports=unpack_1$1;
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n=n||self).efrt=t()}(this,function(){"use strict";const n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",t=n.split("").reduce(function(n,t,e){return n[t]=e,n},{});var e=function(n){if(void 0!==t[n])return t[n];let e=0,o=1,s=36,r=1;for(;o<n.length;e+=s,o++,s*=36);for(let t=n.length-1;t>=0;t--,r*=36){let o=n.charCodeAt(t)-48;o>10&&(o-=7),e+=o*r}return e};const o=function(n,t,o){const s=e(t);return s<n.symCount?n.syms[s]:o+s+1-n.symCount};var s=function(n){const t={nodes:n.split(";"),syms:[],symCount:0};return n.match(":")&&function(n){const t=new RegExp("([0-9A-Z]+):([0-9A-Z]+)");for(let o=0;o<n.nodes.length;o++){const s=t.exec(n.nodes[o]);if(!s){n.symCount=o;break}n.syms[e(s[1])]=e(s[2])}n.nodes=n.nodes.slice(n.symCount,n.nodes.length)}(t),function(n){const t=[],e=(s,r)=>{let c=n.nodes[s];"!"===c[0]&&(t.push(r),c=c.slice(1));const u=c.split(/([A-Z0-9,]+)/g);for(let c=0;c<u.length;c+=2){const i=u[c],f=u[c+1];if(!i)continue;const l=r+i;if(","===f||void 0===f){t.push(l);continue}const d=o(n,f,s);e(d,l)}};return e(0,""),t}(t)};return function(n){const t=n.split("|").reduce((n,t)=>{const e=t.split("¦");return n[e[0]]=e[1],n},{}),e={};return Object.keys(t).forEach(function(n){const o=s(t[n]);"true"===n&&(n=!0);for(let t=0;t<o.length;t++){const s=o[t];!0===e.hasOwnProperty(s)?!1===Array.isArray(e[s])?e[s]=[e[s],n]:e[s].push(n):e[s]=n}}),e}});

@@ -1,2 +0,2 @@

"use strict";var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t,n){return t(n={exports:{}},n.exports),n.exports}const commonPrefix=function(t,n){let e=Math.min(t.length,n.length);for(;e>0;){const o=t.slice(0,e);if(o===n.slice(0,e))return o;e-=1}return""},unique=function(t){t.sort();for(let n=1;n<t.length;n++)t[n-1]===t[n]&&t.splice(n,1)};var fns={commonPrefix:commonPrefix,unique:unique};const Histogram=function(){this.counts={}},methods={init:function(t){void 0===this.counts[t]&&(this.counts[t]=0)},add:function(t,n){void 0===n&&(n=1),this.init(t),this.counts[t]+=n},countOf:function(t){return this.init(t),this.counts[t]},highest:function(t){let n=[];const e=Object.keys(this.counts);for(let t=0;t<e.length;t++){const o=e[t];n.push([o,this.counts[o]])}return n.sort(function(t,n){return n[1]-t[1]}),t&&(n=n.slice(0,t)),n}};Object.keys(methods).forEach(function(t){Histogram.prototype[t]=methods[t]});var histogram=Histogram;const BASE=36,seq="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",cache=seq.split("").reduce(function(t,n,e){return t[n]=e,t},{}),toAlphaCode=function(t){if(void 0!==seq[t])return seq[t];let n=1,e=36,o="";for(;t>=e;t-=e,n++,e*=36);for(;n--;){const n=t%36;o=String.fromCharCode((n<10?48:55)+n)+o,t=(t-n)/36}return o},fromAlphaCode=function(t){if(void 0!==cache[t])return cache[t];let n=0,e=1,o=36,s=1;for(;e<t.length;n+=o,e++,o*=36);for(let e=t.length-1;e>=0;e--,s*=36){let o=t.charCodeAt(e)-48;o>10&&(o-=7),n+=o*s}return n};var encoding={toAlphaCode:toAlphaCode,fromAlphaCode:fromAlphaCode};const config={NODE_SEP:";",KEY_VAL:":",STRING_SEP:",",TERMINAL_PREFIX:"!",BASE:36},nodeLine=function(t,n){let e="",o="";t.isTerminal(n)&&(e+=config.TERMINAL_PREFIX);const s=t.nodeProps(n);for(let i=0;i<s.length;i++){const r=s[i];if("number"==typeof n[r]){e+=o+r,o=config.STRING_SEP;continue}if(t.syms[n[r]._n]){e+=o+r+t.syms[n[r]._n],o="";continue}let c=encoding.toAlphaCode(n._n-n[r]._n-1+t.symCount);n[r]._g&&c.length>=n[r]._g.length&&1===n[n[r]._g]?(e+=o+r+(c=n[r]._g),o=config.STRING_SEP):(e+=o+r+c,o="")}return e},analyzeRefs=function(t,n){if(t.visited(n))return;const e=t.nodeProps(n,!0);for(let o=0;o<e.length;o++){const s=e[o],i=n._n-n[s]._n-1;i<config.BASE&&t.histRel.add(i),t.histAbs.add(n[s]._n,encoding.toAlphaCode(i).length-1),analyzeRefs(t,n[s])}},symbolCount=function(t){t.histAbs=t.histAbs.highest(config.BASE);const n=[];n[-1]=0;let e=0,o=0;const s=3+encoding.toAlphaCode(t.nodeCount).length;for(let i=0;i<config.BASE&&void 0!==t.histAbs[i];i++)n[i]=t.histAbs[i][1]-s-t.histRel.countOf(config.BASE-i-1)+n[i-1],n[i]>=e&&(e=n[i],o=i+1);return o},numberNodes=function(t,n){if(void 0!==n._n)return;const e=t.nodeProps(n,!0);for(let o=0;o<e.length;o++)numberNodes(t,n[e[o]]);n._n=t.pos++,t.nodes.unshift(n)},pack=function(t){t.nodes=[],t.nodeCount=0,t.syms={},t.symCount=0,t.pos=0,t.optimize(),t.histAbs=new histogram,t.histRel=new histogram,numberNodes(t,t.root),t.nodeCount=t.nodes.length,t.prepDFS(),analyzeRefs(t,t.root),t.symCount=symbolCount(t);for(let n=0;n<t.symCount;n++)t.syms[t.histAbs[n][0]]=encoding.toAlphaCode(n);for(let n=0;n<t.nodeCount;n++)t.nodes[n]=nodeLine(t,t.nodes[n]);for(let n=t.symCount-1;n>=0;n--)t.nodes.unshift(encoding.toAlphaCode(n)+config.KEY_VAL+encoding.toAlphaCode(t.nodeCount-t.histAbs[n][0]-1));return t.nodes.join(config.NODE_SEP)};var pack_1=pack;const NOT_ALLOWED=new RegExp("[0-9A-Z,;!:|¦]");var methods$1={insertWords:function(t){if(void 0!==t){"string"==typeof t&&(t=t.split(/[^a-zA-Z]+/));for(let n=0;n<t.length;n++)t[n]=t[n].toLowerCase();fns.unique(t);for(let n=0;n<t.length;n++)null===t[n].match(NOT_ALLOWED)&&this.insert(t[n])}},insert:function(t){this._insert(t,this.root);const n=this.lastWord;if(this.lastWord=t,fns.commonPrefix(t,n)===n)return;const e=this.uniqueNode(n,t,this.root);e&&this.combineSuffixNode(e)},_insert:function(t,n){let e,o;if(0===t.length)return;const s=Object.keys(n);for(let i=0;i<s.length;i++){const r=s[i];if(0!==(e=fns.commonPrefix(t,r)).length){if(r===e&&"object"==typeof n[r])return void this._insert(t.slice(e.length),n[r]);if(r===t&&"number"==typeof n[r])return;return(o={})[r.slice(e.length)]=n[r],this.addTerminal(o,t=t.slice(e.length)),delete n[r],n[e]=o,void this.wordCount++}}this.addTerminal(n,t),this.wordCount++},addTerminal:function(t,n){if(n.length<=1)return void(t[n]=1);const e={};t[n[0]]=e,this.addTerminal(e,n.slice(1))},nodeProps:function(t,n){const e=[];for(const o in t)""!==o&&"_"!==o[0]&&(n&&"object"!=typeof t[o]||e.push(o));return e.sort(),e},optimize:function(){this.combineSuffixNode(this.root),this.prepDFS(),this.countDegree(this.root),this.prepDFS(),this.collapseChains(this.root)},combineSuffixNode:function(t){if(t._c)return t;let n=[];this.isTerminal(t)&&n.push("!");const e=this.nodeProps(t);for(let o=0;o<e.length;o++){const s=e[o];"object"==typeof t[s]?(t[s]=this.combineSuffixNode(t[s]),n.push(s),n.push(t[s]._c)):n.push(s)}n=n.join("-");const o=this.suffixes[n];return o||(this.suffixes[n]=t,t._c=this.cNext++,t)},prepDFS:function(){this.vCur++},visited:function(t){return t._v===this.vCur||(t._v=this.vCur,!1)},countDegree:function(t){if(void 0===t._d&&(t._d=0),t._d++,this.visited(t))return;const n=this.nodeProps(t,!0);for(let e=0;e<n.length;e++)this.countDegree(t[n[e]])},collapseChains:function(t){let n,e,o,s;if(!this.visited(t)){for(e=this.nodeProps(t),s=0;s<e.length;s++)"object"==typeof(o=t[n=e[s]])&&(this.collapseChains(o),void 0===o._g||1!==o._d&&1!==o._g.length||(delete t[n],t[n+=o._g]=o[o._g]));1!==e.length||this.isTerminal(t)||(t._g=n)}},isTerminal:function(t){return!!t[""]},uniqueNode:function(t,n,e){const o=this.nodeProps(e,!0);for(let s=0;s<o.length;s++){const i=o[s];if(i===t.slice(0,i.length))return i!==n.slice(0,i.length)?e[i]:this.uniqueNode(t.slice(i.length),n.slice(i.length),e[i])}},pack:function(){return pack_1(this)}};const Trie=function(t){this.root={},this.lastWord="",this.suffixes={},this.suffixCounts={},this.cNext=1,this.wordCount=0,this.insertWords(t),this.vCur=0};Object.keys(methods$1).forEach(function(t){Trie.prototype[t]=methods$1[t]});var trie=Trie;const isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},handleFormats=function(t){return null==t?{}:"string"==typeof t?t.split(/ +/g).reduce(function(t,n){return t[n]=!0,t},{}):isArray(t)?t.reduce(function(t,n){return t[n]=!0,t},{}):t},pack$1=function(t){var n;t=null==(n=t)?{}:"string"==typeof n?n.split(/ +/g).reduce(function(t,n){return t[n]=!0,t},{}):isArray(n)?n.reduce(function(t,n){return t[n]=!0,t},{}):n;const e=Object.keys(t).reduce(function(n,e){const o=t[e];if(isArray(o)){for(let t=0;t<o.length;t++)n[o[t]]=n[o[t]]||[],n[o[t]].push(e);return n}return!1===n.hasOwnProperty(o)&&Object.defineProperty(n,o,{writable:!0,enumerable:!0,configurable:!0,value:[]}),n[o].push(e),n},{});return Object.keys(e).forEach(function(t){const n=new trie(e[t]);e[t]=n.pack()}),Object.keys(e).map(t=>t+"¦"+e[t]).join("|")};var pack_1$1=pack$1,symbols=function(t){const n=new RegExp("([0-9A-Z]+):([0-9A-Z]+)");for(let e=0;e<t.nodes.length;e++){const o=n.exec(t.nodes[e]);if(!o){t.symCount=e;break}t.syms[encoding.fromAlphaCode(o[1])]=encoding.fromAlphaCode(o[2])}t.nodes=t.nodes.slice(t.symCount,t.nodes.length)};const indexFromRef=function(t,n,e){const o=encoding.fromAlphaCode(n);return o<t.symCount?t.syms[o]:e+o+1-t.symCount},toArray=function(t){const n=[],e=(o,s)=>{let i=t.nodes[o];"!"===i[0]&&(n.push(s),i=i.slice(1));const r=i.split(/([A-Z0-9,]+)/g);for(let i=0;i<r.length;i+=2){const c=r[i],u=r[i+1];if(!c)continue;const f=s+c;if(","===u||void 0===u){n.push(f);continue}const l=indexFromRef(t,u,o);e(l,f)}};return e(0,""),n},unpack=function(t){const n={nodes:t.split(";"),syms:[],symCount:0};return t.match(":")&&symbols(n),toArray(n)};var unpack_1=unpack,unpack_1$1=function(t){const n=t.split("|").reduce((t,n)=>{const e=n.split("¦");return t[e[0]]=e[1],t},{}),e={};return Object.keys(n).forEach(function(t){const o=unpack_1(n[t]);"true"===t&&(t=!0);for(let n=0;n<o.length;n++){const s=o[n];!0===e.hasOwnProperty(s)?!1===Array.isArray(e[s])?e[s]=[e[s],t]:e[s].push(t):e[s]=t}}),e},src=createCommonjsModule(function(t){const n={pack:pack_1$1,unpack:unpack_1$1};"undefined"!=typeof self?self.efrt=n:"undefined"!=typeof window?window.efrt=n:void 0!==commonjsGlobal&&(commonjsGlobal.efrt=n),t.exports=n});module.exports=src;
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).efrt=n()}(this,function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=function(t,n){let e=Math.min(t.length,n.length);for(;e>0;){const o=t.slice(0,e);if(o===n.slice(0,e))return o;e-=1}return""},e=function(t){t.sort();for(let n=1;n<t.length;n++)t[n-1]===t[n]&&t.splice(n,1)};const o=function(){this.counts={}},s={init:function(t){void 0===this.counts[t]&&(this.counts[t]=0)},add:function(t,n){void 0===n&&(n=1),this.init(t),this.counts[t]+=n},countOf:function(t){return this.init(t),this.counts[t]},highest:function(t){let n=[];const e=Object.keys(this.counts);for(let t=0;t<e.length;t++){const o=e[t];n.push([o,this.counts[o]])}return n.sort(function(t,n){return n[1]-t[1]}),t&&(n=n.slice(0,t)),n}};Object.keys(s).forEach(function(t){o.prototype[t]=s[t]});var i=o;const r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",u=r.split("").reduce(function(t,n,e){return t[n]=e,t},{});var c=function(t){if(void 0!==r[t])return r[t];let n=1,e=36,o="";for(;t>=e;t-=e,n++,e*=36);for(;n--;){const n=t%36;o=String.fromCharCode((n<10?48:55)+n)+o,t=(t-n)/36}return o},f=function(t){if(void 0!==u[t])return u[t];let n=0,e=1,o=36,s=1;for(;e<t.length;n+=o,e++,o*=36);for(let e=t.length-1;e>=0;e--,s*=36){let o=t.charCodeAt(e)-48;o>10&&(o-=7),n+=o*s}return n};const h=";",l=":",d=",",p="!",a=36,g=function(t,n){let e="",o="";t.isTerminal(n)&&(e+=p);const s=t.nodeProps(n);for(let i=0;i<s.length;i++){const r=s[i];if("number"==typeof n[r]){e+=o+r,o=d;continue}if(t.syms[n[r]._n]){e+=o+r+t.syms[n[r]._n],o="";continue}let u=c(n._n-n[r]._n-1+t.symCount);n[r]._g&&u.length>=n[r]._g.length&&1===n[n[r]._g]?(e+=o+r+(u=n[r]._g),o=d):(e+=o+r+u,o="")}return e},y=function(t,n){if(t.visited(n))return;const e=t.nodeProps(n,!0);for(let o=0;o<e.length;o++){const s=e[o],i=n._n-n[s]._n-1;i<a&&t.histRel.add(i),t.histAbs.add(n[s]._n,c(i).length-1),y(t,n[s])}},m=function(t,n){if(void 0!==n._n)return;const e=t.nodeProps(n,!0);for(let o=0;o<e.length;o++)m(t,n[e[o]]);n._n=t.pos++,t.nodes.unshift(n)};var b=function(t){t.nodes=[],t.nodeCount=0,t.syms={},t.symCount=0,t.pos=0,t.optimize(),t.histAbs=new i,t.histRel=new i,m(t,t.root),t.nodeCount=t.nodes.length,t.prepDFS(),y(t,t.root),t.symCount=function(t){t.histAbs=t.histAbs.highest(a);const n=[];n[-1]=0;let e=0,o=0;const s=3+c(t.nodeCount).length;for(let i=0;i<a&&void 0!==t.histAbs[i];i++)n[i]=t.histAbs[i][1]-s-t.histRel.countOf(a-i-1)+n[i-1],n[i]>=e&&(e=n[i],o=i+1);return o}(t);for(let n=0;n<t.symCount;n++)t.syms[t.histAbs[n][0]]=c(n);for(let n=0;n<t.nodeCount;n++)t.nodes[n]=g(t,t.nodes[n]);for(let n=t.symCount-1;n>=0;n--)t.nodes.unshift(c(n)+l+c(t.nodeCount-t.histAbs[n][0]-1));return t.nodes.join(h)};const v=new RegExp("[0-9A-Z,;!:|¦]");var C={insertWords:function(t){if(void 0!==t){"string"==typeof t&&(t=t.split(/[^a-zA-Z]+/));for(let n=0;n<t.length;n++)t[n]=t[n].toLowerCase();e(t);for(let n=0;n<t.length;n++)null===t[n].match(v)&&this.insert(t[n])}},insert:function(t){this._insert(t,this.root);const e=this.lastWord;if(this.lastWord=t,n(t,e)===e)return;const o=this.uniqueNode(e,t,this.root);o&&this.combineSuffixNode(o)},_insert:function(t,e){let o,s;if(0===t.length)return;const i=Object.keys(e);for(let r=0;r<i.length;r++){const u=i[r];if(0!==(o=n(t,u)).length){if(u===o&&"object"==typeof e[u])return void this._insert(t.slice(o.length),e[u]);if(u===t&&"number"==typeof e[u])return;return(s={})[u.slice(o.length)]=e[u],this.addTerminal(s,t=t.slice(o.length)),delete e[u],e[o]=s,void this.wordCount++}}this.addTerminal(e,t),this.wordCount++},addTerminal:function(t,n){if(n.length<=1)return void(t[n]=1);const e={};t[n[0]]=e,this.addTerminal(e,n.slice(1))},nodeProps:function(t,n){const e=[];for(const o in t)""!==o&&"_"!==o[0]&&(n&&"object"!=typeof t[o]||e.push(o));return e.sort(),e},optimize:function(){this.combineSuffixNode(this.root),this.prepDFS(),this.countDegree(this.root),this.prepDFS(),this.collapseChains(this.root)},combineSuffixNode:function(t){if(t._c)return t;let n=[];this.isTerminal(t)&&n.push("!");const e=this.nodeProps(t);for(let o=0;o<e.length;o++){const s=e[o];"object"==typeof t[s]?(t[s]=this.combineSuffixNode(t[s]),n.push(s),n.push(t[s]._c)):n.push(s)}n=n.join("-");const o=this.suffixes[n];return o||(this.suffixes[n]=t,t._c=this.cNext++,t)},prepDFS:function(){this.vCur++},visited:function(t){return t._v===this.vCur||(t._v=this.vCur,!1)},countDegree:function(t){if(void 0===t._d&&(t._d=0),t._d++,this.visited(t))return;const n=this.nodeProps(t,!0);for(let e=0;e<n.length;e++)this.countDegree(t[n[e]])},collapseChains:function(t){let n,e,o,s;if(!this.visited(t)){for(e=this.nodeProps(t),s=0;s<e.length;s++)"object"==typeof(o=t[n=e[s]])&&(this.collapseChains(o),void 0===o._g||1!==o._d&&1!==o._g.length||(delete t[n],t[n+=o._g]=o[o._g]));1!==e.length||this.isTerminal(t)||(t._g=n)}},isTerminal:function(t){return!!t[""]},uniqueNode:function(t,n,e){const o=this.nodeProps(e,!0);for(let s=0;s<o.length;s++){const i=o[s];if(i===t.slice(0,i.length))return i!==n.slice(0,i.length)?e[i]:this.uniqueNode(t.slice(i.length),n.slice(i.length),e[i])}},pack:function(){return b(this)}};const _=function(t){this.root={},this.lastWord="",this.suffixes={},this.suffixCounts={},this.cNext=1,this.wordCount=0,this.insertWords(t),this.vCur=0};Object.keys(C).forEach(function(t){_.prototype[t]=C[t]});var w=_;const j=function(t){return"[object Array]"===Object.prototype.toString.call(t)};var x=function(t){var n;t=null==(n=t)?{}:"string"==typeof n?n.split(/ +/g).reduce(function(t,n){return t[n]=!0,t},{}):j(n)?n.reduce(function(t,n){return t[n]=!0,t},{}):n;const e=Object.keys(t).reduce(function(n,e){const o=t[e];if(j(o)){for(let t=0;t<o.length;t++)n[o[t]]=n[o[t]]||[],n[o[t]].push(e);return n}return!1===n.hasOwnProperty(o)&&Object.defineProperty(n,o,{writable:!0,enumerable:!0,configurable:!0,value:[]}),n[o].push(e),n},{});return Object.keys(e).forEach(function(t){const n=new w(e[t]);e[t]=n.pack()}),Object.keys(e).map(t=>t+"¦"+e[t]).join("|")};const A=function(t,n,e){const o=f(n);return o<t.symCount?t.syms[o]:e+o+1-t.symCount};var O=function(t){const n={nodes:t.split(";"),syms:[],symCount:0};return t.match(":")&&function(t){const n=new RegExp("([0-9A-Z]+):([0-9A-Z]+)");for(let e=0;e<t.nodes.length;e++){const o=n.exec(t.nodes[e]);if(!o){t.symCount=e;break}t.syms[f(o[1])]=f(o[2])}t.nodes=t.nodes.slice(t.symCount,t.nodes.length)}(n),function(t){const n=[],e=(o,s)=>{let i=t.nodes[o];"!"===i[0]&&(n.push(s),i=i.slice(1));const r=i.split(/([A-Z0-9,]+)/g);for(let i=0;i<r.length;i+=2){const u=r[i],c=r[i+1];if(!u)continue;const f=s+u;if(","===c||void 0===c){n.push(f);continue}const h=A(t,c,o);e(h,f)}};return e(0,""),n}(n)},k=function(t){const n=t.split("|").reduce((t,n)=>{const e=n.split("¦");return t[e[0]]=e[1],t},{}),e={};return Object.keys(n).forEach(function(t){const o=O(n[t]);"true"===t&&(t=!0);for(let n=0;n<o.length;n++){const s=o[n];!0===e.hasOwnProperty(s)?!1===Array.isArray(e[s])?e[s]=[e[s],t]:e[s].push(t):e[s]=t}}),e};return function(t,n){return t(n={exports:{}},n.exports),n.exports}(function(n){const e={pack:x,unpack:k};"undefined"!=typeof self?self.efrt=e:"undefined"!=typeof window?window.efrt=e:void 0!==t&&(t.efrt=e),n.exports=e})});
//# sourceMappingURL=efrt.min.js.map

@@ -5,3 +5,3 @@ {

"description": "neato compression of key-value data",
"version": "2.2.0",
"version": "2.2.1",
"main": "./builds/efrt.js",

@@ -8,0 +8,0 @@ "repository": {

@@ -94,6 +94,9 @@ <div align="center">

---
<h5 align="left">
or, an Array:
</h5>
if you pass it an array of strings, it just creates an object with `true` values:
```js

@@ -100,0 +103,0 @@ const data = [

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