string-uglify 2.0.6 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @name string-uglify
3
3
  * @fileoverview Shorten sets of strings deterministically, to be git-friendly
4
- * @version 2.0.6
4
+ * @version 2.0.7
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-uglify/}
8
8
  */
9
9
 
10
- var version$1 = "2.0.6";
10
+ var version$1 = "2.0.7";
11
11
 
12
12
  const version = version$1;
13
13
  function tellcp(str, idNum = 0) {
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @name string-uglify
3
3
  * @fileoverview Shorten sets of strings deterministically, to be git-friendly
4
- * @version 2.0.6
4
+ * @version 2.0.7
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-uglify/}
8
8
  */
9
9
 
10
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).stringUglify={})}(this,(function(e){"use strict";function t(e,t=0){return e.codePointAt(t)||0}function i(e){const i="abcdefghijklmnopqrstuvwxyz",s="abcdefghijklmnopqrstuvwxyz0123456789",l={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},n={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},r={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},c=[];if(!Array.isArray(e)||!e.length)return e;for(let o=0,u=e.length;o<u;o++){if(e.indexOf(e[o])<o){c.push(c[e.indexOf(e[o])]);continue}const u=".#".includes(e[o][0])?e[o][0]:"",h=Array.from(e[o]).reduce(((e,i)=>e+t(i)),0);if(".#".includes(e[o][0])&&e[o].length<4||!".#".includes(e[o][0])&&e[o].length<3){const t=e[o];if(!c.includes(t)){c.push(t),t.startsWith(".")&&2===t.length&&!1===l[t.slice(1)]?l[t.slice(1)]=!0:t.startsWith("#")&&2===t.length&&!1===n[t.slice(1)]?n[t.slice(1)]=!0:t.startsWith(".")||t.startsWith("#")||1!==t.length||!1!==r[t]||(r[t]=!0);continue}}let f=`${u}${i[h%i.length]}${s[h%s.length]}`;if(c.includes(f)){let i=f,l=0;const n=Array.from(e[o]).reduce(((e,i)=>e<200?e+t(i):(e+t(i))%s.length),0),r=Array.from(e[o]).map((e=>t(e))).reduce(((e,t)=>{let i=e+t;do{i=String(i).split("").reduce(((e,t)=>e+Number.parseInt(t,10)),0)}while(i>=10);return i}),0);for(;c.includes(i);)l+=1,i+=s[n*r*l%s.length];f=i}c.push(f),f.startsWith(".")&&2===f.length&&!1===l[f.slice(1)]?l[f.slice(1)]=!0:f.startsWith("#")&&2===f.length&&!1===n[f.slice(1)]?n[f.slice(1)]=!0:f.startsWith(".")||f.startsWith("#")||1!==f.length||!1!==r[f]||(r[f]=!0)}for(let e=0,t=c.length;e<t;e++)c[e].startsWith(".")?!1===l[c[e].slice(1,2)]?(l[c[e].slice(1,2)]=c[e],c[e]=c[e].slice(0,2)):l[c[e].slice(1,2)]===c[e]&&(c[e]=c[e].slice(0,2)):c[e].startsWith("#")?!1===n[c[e].slice(1,2)]?(n[c[e].slice(1,2)]=c[e],c[e]=c[e].slice(0,2)):n[c[e].slice(1,2)]===c[e]&&(c[e]=c[e].slice(0,2)):c[e].startsWith(".")||c[e].startsWith("#")||(r[c[e].slice(0,1)]?r[c[e].slice(0,1)]===c[e]&&(c[e]=c[e].slice(0,1)):(r[c[e].slice(0,1)]=c[e],c[e]=c[e].slice(0,1)));return c}e.uglifyArr=i,e.uglifyById=function(e,t){return i(e)[t]},e.version="2.0.6",Object.defineProperty(e,"__esModule",{value:!0})}));
10
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).stringUglify={})}(this,(function(e){"use strict";function t(e,t=0){return e.codePointAt(t)||0}function i(e){const i="abcdefghijklmnopqrstuvwxyz",s="abcdefghijklmnopqrstuvwxyz0123456789",l={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},n={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},r={a:!1,b:!1,c:!1,d:!1,e:!1,f:!1,g:!1,h:!1,i:!1,j:!1,k:!1,l:!1,m:!1,n:!1,o:!1,p:!1,q:!1,r:!1,s:!1,t:!1,u:!1,v:!1,w:!1,x:!1,y:!1,z:!1},c=[];if(!Array.isArray(e)||!e.length)return e;for(let o=0,u=e.length;o<u;o++){if(e.indexOf(e[o])<o){c.push(c[e.indexOf(e[o])]);continue}const u=".#".includes(e[o][0])?e[o][0]:"",h=Array.from(e[o]).reduce(((e,i)=>e+t(i)),0);if(".#".includes(e[o][0])&&e[o].length<4||!".#".includes(e[o][0])&&e[o].length<3){const t=e[o];if(!c.includes(t)){c.push(t),t.startsWith(".")&&2===t.length&&!1===l[t.slice(1)]?l[t.slice(1)]=!0:t.startsWith("#")&&2===t.length&&!1===n[t.slice(1)]?n[t.slice(1)]=!0:t.startsWith(".")||t.startsWith("#")||1!==t.length||!1!==r[t]||(r[t]=!0);continue}}let f=`${u}${i[h%i.length]}${s[h%s.length]}`;if(c.includes(f)){let i=f,l=0;const n=Array.from(e[o]).reduce(((e,i)=>e<200?e+t(i):(e+t(i))%s.length),0),r=Array.from(e[o]).map((e=>t(e))).reduce(((e,t)=>{let i=e+t;do{i=String(i).split("").reduce(((e,t)=>e+Number.parseInt(t,10)),0)}while(i>=10);return i}),0);for(;c.includes(i);)l+=1,i+=s[n*r*l%s.length];f=i}c.push(f),f.startsWith(".")&&2===f.length&&!1===l[f.slice(1)]?l[f.slice(1)]=!0:f.startsWith("#")&&2===f.length&&!1===n[f.slice(1)]?n[f.slice(1)]=!0:f.startsWith(".")||f.startsWith("#")||1!==f.length||!1!==r[f]||(r[f]=!0)}for(let e=0,t=c.length;e<t;e++)c[e].startsWith(".")?!1===l[c[e].slice(1,2)]?(l[c[e].slice(1,2)]=c[e],c[e]=c[e].slice(0,2)):l[c[e].slice(1,2)]===c[e]&&(c[e]=c[e].slice(0,2)):c[e].startsWith("#")?!1===n[c[e].slice(1,2)]?(n[c[e].slice(1,2)]=c[e],c[e]=c[e].slice(0,2)):n[c[e].slice(1,2)]===c[e]&&(c[e]=c[e].slice(0,2)):c[e].startsWith(".")||c[e].startsWith("#")||(r[c[e].slice(0,1)]?r[c[e].slice(0,1)]===c[e]&&(c[e]=c[e].slice(0,1)):(r[c[e].slice(0,1)]=c[e],c[e]=c[e].slice(0,1)));return c}e.uglifyArr=i,e.uglifyById=function(e,t){return i(e)[t]},e.version="2.0.7",Object.defineProperty(e,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "string-uglify",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "Shorten sets of strings deterministically, to be git-friendly",
5
5
  "keywords": [
6
6
  "class",
@@ -103,21 +103,21 @@
103
103
  "@rollup/plugin-node-resolve": "^13.0.6",
104
104
  "@rollup/plugin-strip": "^2.1.0",
105
105
  "@rollup/plugin-typescript": "^8.3.0",
106
- "@types/node": "^16.11.9",
106
+ "@types/node": "^16.11.10",
107
107
  "@types/tap": "^15.0.5",
108
- "@typescript-eslint/eslint-plugin": "^5.4.0",
109
- "@typescript-eslint/parser": "^5.4.0",
110
- "core-js": "^3.19.1",
108
+ "@typescript-eslint/eslint-plugin": "^5.5.0",
109
+ "@typescript-eslint/parser": "^5.5.0",
110
+ "core-js": "^3.19.2",
111
111
  "cross-env": "^7.0.3",
112
112
  "eslint": "^8.3.0",
113
- "lect": "^0.18.6",
114
- "rollup": "^2.60.0",
113
+ "lect": "^0.18.7",
114
+ "rollup": "^2.60.1",
115
115
  "rollup-plugin-ascii": "^0.0.3",
116
116
  "rollup-plugin-banner": "^0.2.1",
117
117
  "rollup-plugin-cleanup": "^3.2.1",
118
118
  "rollup-plugin-dts": "^4.0.1",
119
119
  "rollup-plugin-terser": "^7.0.2",
120
- "tap": "^15.1.2",
120
+ "tap": "^15.1.5",
121
121
  "tslib": "^2.3.1",
122
122
  "typescript": "^4.5.2"
123
123
  },