foxts 3.3.1 → 3.3.3

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,3 +1 @@
1
- declare function escapeHTML(str: string): string;
2
-
3
- export { escapeHTML };
1
+ export * from 'fast-escape-html';
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});const e=/["&'<>]/;exports.escapeHTML=function(t){let a=e.exec(t);if(null===a)return t;let c="",r="",s=a.index,l=0;for(let e=t.length;s<e;s++){switch(t.charCodeAt(s)){case 34:c="&quot;";break;case 38:c="&amp;";break;case 39:c="&#39;";break;case 60:c="&lt;";break;case 62:c="&gt;";break;default:continue}l!==s&&(r+=t.slice(l,s)),l=s+1,r+=c}return l===s?r:r+t.slice(l,s)};
1
+ Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fast-escape-html");Object.keys(e).forEach(function(t){"default"===t||Object.prototype.hasOwnProperty.call(exports,t)||Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
@@ -1,5 +1,5 @@
1
1
  /**
2
- * A 65% faster join than the native `Array.prototype.join` for string arrays and string separator.
2
+ * A 200% faster join than the native `Array.prototype.join` for string arrays and string separator.
3
3
  */
4
4
  declare function fastStringArrayJoin(arr: string[], sep: string): string;
5
5
 
@@ -1,3 +1 @@
1
- declare function escapeHTML(str: string): string;
2
-
3
- export { escapeHTML };
1
+ export * from 'fast-escape-html';
@@ -1 +1 @@
1
- let e=/["&'<>]/;function t(t){let a=e.exec(t);if(null===a)return t;let c="",r="",l=a.index,n=0;for(let e=t.length;l<e;l++){switch(t.charCodeAt(l)){case 34:c="&quot;";break;case 38:c="&amp;";break;case 39:c="&#39;";break;case 60:c="&lt;";break;case 62:c="&gt;";break;default:continue}n!==l&&(r+=t.slice(n,l)),n=l+1,r+=c}return n===l?r:r+t.slice(n,l)}export{t as escapeHTML};
1
+ export*from"fast-escape-html";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * A 65% faster join than the native `Array.prototype.join` for string arrays and string separator.
2
+ * A 200% faster join than the native `Array.prototype.join` for string arrays and string separator.
3
3
  */
4
4
  declare function fastStringArrayJoin(arr: string[], sep: string): string;
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foxts",
3
- "version": "3.3.1",
3
+ "version": "3.3.3",
4
4
  "description": "Opinionated collection of common TypeScript utils by @SukkaW",
5
5
  "repository": {
6
6
  "url": "https://github.com/SukkaW/foxts"
@@ -338,33 +338,37 @@
338
338
  ],
339
339
  "author": "SukkaW <https://skk.moe>",
340
340
  "license": "MIT",
341
+ "dependencies": {
342
+ "fast-escape-html": "^1.0.0"
343
+ },
341
344
  "devDependencies": {
342
- "@eslint-sukka/node": "^6.19.0",
345
+ "@eslint-sukka/node": "^6.20.0",
343
346
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
344
347
  "@mitata/counters": "^0.0.8",
345
348
  "@monyone/aho-corasick": "^1.0.4",
349
+ "@napi-rs/escape": "^1.0.1",
346
350
  "@package-json/types": "^0.0.11",
347
351
  "@swc-node/register": "^1.10.10",
348
- "@swc/core": "^1.11.24",
352
+ "@swc/core": "^1.11.29",
349
353
  "@types/escape-html": "^1.0.4",
350
354
  "@types/escape-regexp": "^0.0.3",
351
355
  "@types/html-escaper": "^3.0.4",
352
356
  "@types/lodash.escape": "^4.0.9",
353
357
  "@types/lodash.escaperegexp": "^4.1.9",
354
358
  "@types/mocha": "^10.0.10",
355
- "@types/node": "^22.15.17",
359
+ "@types/node": "^22.15.21",
356
360
  "@types/regex-escape": "^3.4.1",
357
361
  "@types/sinon": "^17.0.4",
358
- "bumpp": "^10.1.0",
359
- "bunchee": "^6.5.1",
362
+ "bumpp": "^10.1.1",
363
+ "bunchee": "^6.5.2",
360
364
  "devalue": "^5.1.1",
361
365
  "escape-goat": "^3.0.0",
362
366
  "escape-html": "^1.0.3",
363
367
  "escape-regexp": "^0.0.1",
364
368
  "escape-string-regexp": "4",
365
- "eslint": "^9.26.0",
366
- "eslint-config-sukka": "^6.19.0",
367
- "eslint-formatter-sukka": "^6.19.0",
369
+ "eslint": "^9.27.0",
370
+ "eslint-config-sukka": "^6.20.0",
371
+ "eslint-formatter-sukka": "^6.20.0",
368
372
  "expect": "^29.7.0",
369
373
  "fastscan": "^1.0.6",
370
374
  "fdir": "^6.4.4",
@@ -373,7 +377,7 @@
373
377
  "lodash.escape": "^4.0.1",
374
378
  "lodash.escaperegexp": "^4.1.2",
375
379
  "mitata": "^1.0.34",
376
- "mocha": "^11.2.2",
380
+ "mocha": "^11.4.0",
377
381
  "modern-ahocorasick": "^2.0.4",
378
382
  "nyc": "^17.1.0",
379
383
  "regex-escape": "^3.4.11",