foxts 3.3.2 → 3.3.4

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,n=t.length;for(;s<n;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)),r+=c,l=s+1}return l!==s&&(r+=t.slice(l,s)),r};
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,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,s=t.length;for(;l<s;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)),r+=c,n=l+1}return n!==l&&(r+=t.slice(n,l)),r}export{t as escapeHTML};
1
+ export*from"fast-escape-html";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foxts",
3
- "version": "3.3.2",
3
+ "version": "3.3.4",
4
4
  "description": "Opinionated collection of common TypeScript utils by @SukkaW",
5
5
  "repository": {
6
6
  "url": "https://github.com/SukkaW/foxts"
@@ -338,8 +338,11 @@
338
338
  ],
339
339
  "author": "SukkaW <https://skk.moe>",
340
340
  "license": "MIT",
341
+ "dependencies": {
342
+ "fast-escape-html": "^1.0.1"
343
+ },
341
344
  "devDependencies": {
342
- "@eslint-sukka/node": "^6.20.0",
345
+ "@eslint-sukka/node": "^6.21.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",
@@ -353,7 +356,7 @@
353
356
  "@types/lodash.escape": "^4.0.9",
354
357
  "@types/lodash.escaperegexp": "^4.1.9",
355
358
  "@types/mocha": "^10.0.10",
356
- "@types/node": "^22.15.21",
359
+ "@types/node": "^22.15.24",
357
360
  "@types/regex-escape": "^3.4.1",
358
361
  "@types/sinon": "^17.0.4",
359
362
  "bumpp": "^10.1.1",
@@ -364,17 +367,17 @@
364
367
  "escape-regexp": "^0.0.1",
365
368
  "escape-string-regexp": "4",
366
369
  "eslint": "^9.27.0",
367
- "eslint-config-sukka": "^6.20.0",
368
- "eslint-formatter-sukka": "^6.20.0",
370
+ "eslint-config-sukka": "^6.21.0",
371
+ "eslint-formatter-sukka": "^6.21.0",
369
372
  "expect": "^29.7.0",
370
373
  "fastscan": "^1.0.6",
371
- "fdir": "^6.4.4",
374
+ "fdir": "^6.4.5",
372
375
  "hexo-util": "^3.3.0",
373
376
  "html-escaper": "2.0.2",
374
377
  "lodash.escape": "^4.0.1",
375
378
  "lodash.escaperegexp": "^4.1.2",
376
379
  "mitata": "^1.0.34",
377
- "mocha": "^11.4.0",
380
+ "mocha": "^11.5.0",
378
381
  "modern-ahocorasick": "^2.0.4",
379
382
  "nyc": "^17.1.0",
380
383
  "regex-escape": "^3.4.11",