foxts 3.3.3 → 3.4.0

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,3 @@
1
- declare function once<T>(fn: (() => T)): (() => T);
1
+ declare function once<T>(fn: (() => T), prewarm?: boolean): (() => T);
2
2
 
3
3
  export { once };
package/dist/cjs/once.js CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0}),exports.once=function(e){let t,o=!1;return()=>(o||(o=!0,t=e()),t)};
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.once=function(e,t=!0){let o,r=!1;return t?(o=e(),()=>o):()=>(r||(r=!0,o=e()),o)};
@@ -1,3 +1,3 @@
1
- declare function once<T>(fn: (() => T)): (() => T);
1
+ declare function once<T>(fn: (() => T), prewarm?: boolean): (() => T);
2
2
 
3
3
  export { once };
package/dist/es/once.mjs CHANGED
@@ -1 +1 @@
1
- function e(e){let n,t=!1;return()=>(t||(t=!0,n=e()),n)}export{e as once};
1
+ function e(n,t=!0){let o,r=!1;return t?(o=n(),()=>o):()=>(r||(r=!0,o=n()),o)}export{e as once};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foxts",
3
- "version": "3.3.3",
3
+ "version": "3.4.0",
4
4
  "description": "Opinionated collection of common TypeScript utils by @SukkaW",
5
5
  "repository": {
6
6
  "url": "https://github.com/SukkaW/foxts"
@@ -339,10 +339,10 @@
339
339
  "author": "SukkaW <https://skk.moe>",
340
340
  "license": "MIT",
341
341
  "dependencies": {
342
- "fast-escape-html": "^1.0.0"
342
+ "fast-escape-html": "^1.0.1"
343
343
  },
344
344
  "devDependencies": {
345
- "@eslint-sukka/node": "^6.20.0",
345
+ "@eslint-sukka/node": "^6.21.0",
346
346
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
347
347
  "@mitata/counters": "^0.0.8",
348
348
  "@monyone/aho-corasick": "^1.0.4",
@@ -356,7 +356,7 @@
356
356
  "@types/lodash.escape": "^4.0.9",
357
357
  "@types/lodash.escaperegexp": "^4.1.9",
358
358
  "@types/mocha": "^10.0.10",
359
- "@types/node": "^22.15.21",
359
+ "@types/node": "^22.15.24",
360
360
  "@types/regex-escape": "^3.4.1",
361
361
  "@types/sinon": "^17.0.4",
362
362
  "bumpp": "^10.1.1",
@@ -367,17 +367,17 @@
367
367
  "escape-regexp": "^0.0.1",
368
368
  "escape-string-regexp": "4",
369
369
  "eslint": "^9.27.0",
370
- "eslint-config-sukka": "^6.20.0",
371
- "eslint-formatter-sukka": "^6.20.0",
370
+ "eslint-config-sukka": "^6.21.0",
371
+ "eslint-formatter-sukka": "^6.21.0",
372
372
  "expect": "^29.7.0",
373
373
  "fastscan": "^1.0.6",
374
- "fdir": "^6.4.4",
374
+ "fdir": "^6.4.5",
375
375
  "hexo-util": "^3.3.0",
376
376
  "html-escaper": "2.0.2",
377
377
  "lodash.escape": "^4.0.1",
378
378
  "lodash.escaperegexp": "^4.1.2",
379
379
  "mitata": "^1.0.34",
380
- "mocha": "^11.4.0",
380
+ "mocha": "^11.5.0",
381
381
  "modern-ahocorasick": "^2.0.4",
382
382
  "nyc": "^17.1.0",
383
383
  "regex-escape": "^3.4.11",