coupeeeez 0.0.1

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.
Files changed (881) hide show
  1. package/LICENSE.MD +7 -0
  2. package/command +18 -0
  3. package/makeApp.ts +17 -0
  4. package/package.json +41 -0
  5. package/stream-api/Message.ts +6 -0
  6. package/stream-api/SSEInjected.ts +3 -0
  7. package/stream-api/SSEServer.ts +37 -0
  8. package/stream-api/SSEServers.ts +36 -0
  9. package/stream-api/StreamApi.ts +39 -0
  10. package/stream-api/app.ts +14 -0
  11. package/stream-api/index.ts +1 -0
  12. package/stream-api/node_modules/.package-lock.json +971 -0
  13. package/stream-api/node_modules/@types/body-parser/LICENSE +21 -0
  14. package/stream-api/node_modules/@types/body-parser/README.md +15 -0
  15. package/stream-api/node_modules/@types/body-parser/index.d.ts +95 -0
  16. package/stream-api/node_modules/@types/body-parser/package.json +64 -0
  17. package/stream-api/node_modules/@types/connect/LICENSE +21 -0
  18. package/stream-api/node_modules/@types/connect/README.md +15 -0
  19. package/stream-api/node_modules/@types/connect/index.d.ts +91 -0
  20. package/stream-api/node_modules/@types/connect/package.json +32 -0
  21. package/stream-api/node_modules/@types/express/LICENSE +21 -0
  22. package/stream-api/node_modules/@types/express/README.md +15 -0
  23. package/stream-api/node_modules/@types/express/index.d.ts +122 -0
  24. package/stream-api/node_modules/@types/express/package.json +45 -0
  25. package/stream-api/node_modules/@types/express-serve-static-core/LICENSE +21 -0
  26. package/stream-api/node_modules/@types/express-serve-static-core/README.md +15 -0
  27. package/stream-api/node_modules/@types/express-serve-static-core/index.d.ts +1244 -0
  28. package/stream-api/node_modules/@types/express-serve-static-core/package.json +51 -0
  29. package/stream-api/node_modules/@types/http-errors/LICENSE +21 -0
  30. package/stream-api/node_modules/@types/http-errors/README.md +15 -0
  31. package/stream-api/node_modules/@types/http-errors/index.d.ts +77 -0
  32. package/stream-api/node_modules/@types/http-errors/package.json +36 -0
  33. package/stream-api/node_modules/@types/mime/LICENSE +21 -0
  34. package/stream-api/node_modules/@types/mime/Mime.d.ts +10 -0
  35. package/stream-api/node_modules/@types/mime/README.md +15 -0
  36. package/stream-api/node_modules/@types/mime/index.d.ts +31 -0
  37. package/stream-api/node_modules/@types/mime/lite.d.ts +7 -0
  38. package/stream-api/node_modules/@types/mime/package.json +30 -0
  39. package/stream-api/node_modules/@types/node/LICENSE +21 -0
  40. package/stream-api/node_modules/@types/node/README.md +15 -0
  41. package/stream-api/node_modules/@types/node/assert/strict.d.ts +111 -0
  42. package/stream-api/node_modules/@types/node/assert.d.ts +1115 -0
  43. package/stream-api/node_modules/@types/node/async_hooks.d.ts +623 -0
  44. package/stream-api/node_modules/@types/node/buffer.buffer.d.ts +472 -0
  45. package/stream-api/node_modules/@types/node/buffer.d.ts +1934 -0
  46. package/stream-api/node_modules/@types/node/child_process.d.ts +1476 -0
  47. package/stream-api/node_modules/@types/node/cluster.d.ts +578 -0
  48. package/stream-api/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  49. package/stream-api/node_modules/@types/node/console.d.ts +453 -0
  50. package/stream-api/node_modules/@types/node/constants.d.ts +21 -0
  51. package/stream-api/node_modules/@types/node/crypto.d.ts +5417 -0
  52. package/stream-api/node_modules/@types/node/dgram.d.ts +600 -0
  53. package/stream-api/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
  54. package/stream-api/node_modules/@types/node/dns/promises.d.ts +503 -0
  55. package/stream-api/node_modules/@types/node/dns.d.ts +923 -0
  56. package/stream-api/node_modules/@types/node/domain.d.ts +170 -0
  57. package/stream-api/node_modules/@types/node/events.d.ts +976 -0
  58. package/stream-api/node_modules/@types/node/fs/promises.d.ts +1317 -0
  59. package/stream-api/node_modules/@types/node/fs.d.ts +4714 -0
  60. package/stream-api/node_modules/@types/node/globals.d.ts +170 -0
  61. package/stream-api/node_modules/@types/node/globals.typedarray.d.ts +41 -0
  62. package/stream-api/node_modules/@types/node/http.d.ts +2134 -0
  63. package/stream-api/node_modules/@types/node/http2.d.ts +2756 -0
  64. package/stream-api/node_modules/@types/node/https.d.ts +579 -0
  65. package/stream-api/node_modules/@types/node/index.d.ts +101 -0
  66. package/stream-api/node_modules/@types/node/inspector.d.ts +277 -0
  67. package/stream-api/node_modules/@types/node/inspector.generated.d.ts +4233 -0
  68. package/stream-api/node_modules/@types/node/module.d.ts +894 -0
  69. package/stream-api/node_modules/@types/node/net.d.ts +1054 -0
  70. package/stream-api/node_modules/@types/node/os.d.ts +507 -0
  71. package/stream-api/node_modules/@types/node/package.json +155 -0
  72. package/stream-api/node_modules/@types/node/path.d.ts +200 -0
  73. package/stream-api/node_modules/@types/node/perf_hooks.d.ts +982 -0
  74. package/stream-api/node_modules/@types/node/process.d.ts +2069 -0
  75. package/stream-api/node_modules/@types/node/punycode.d.ts +117 -0
  76. package/stream-api/node_modules/@types/node/querystring.d.ts +152 -0
  77. package/stream-api/node_modules/@types/node/readline/promises.d.ts +161 -0
  78. package/stream-api/node_modules/@types/node/readline.d.ts +594 -0
  79. package/stream-api/node_modules/@types/node/repl.d.ts +438 -0
  80. package/stream-api/node_modules/@types/node/sea.d.ts +162 -0
  81. package/stream-api/node_modules/@types/node/sqlite.d.ts +937 -0
  82. package/stream-api/node_modules/@types/node/stream/consumers.d.ts +38 -0
  83. package/stream-api/node_modules/@types/node/stream/promises.d.ts +90 -0
  84. package/stream-api/node_modules/@types/node/stream/web.d.ts +573 -0
  85. package/stream-api/node_modules/@types/node/stream.d.ts +1683 -0
  86. package/stream-api/node_modules/@types/node/string_decoder.d.ts +67 -0
  87. package/stream-api/node_modules/@types/node/test.d.ts +2339 -0
  88. package/stream-api/node_modules/@types/node/timers/promises.d.ts +108 -0
  89. package/stream-api/node_modules/@types/node/timers.d.ts +285 -0
  90. package/stream-api/node_modules/@types/node/tls.d.ts +1269 -0
  91. package/stream-api/node_modules/@types/node/trace_events.d.ts +197 -0
  92. package/stream-api/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
  93. package/stream-api/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  94. package/stream-api/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
  95. package/stream-api/node_modules/@types/node/ts5.6/index.d.ts +103 -0
  96. package/stream-api/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  97. package/stream-api/node_modules/@types/node/ts5.7/index.d.ts +103 -0
  98. package/stream-api/node_modules/@types/node/tty.d.ts +208 -0
  99. package/stream-api/node_modules/@types/node/url.d.ts +1057 -0
  100. package/stream-api/node_modules/@types/node/util.d.ts +2325 -0
  101. package/stream-api/node_modules/@types/node/v8.d.ts +952 -0
  102. package/stream-api/node_modules/@types/node/vm.d.ts +1180 -0
  103. package/stream-api/node_modules/@types/node/wasi.d.ts +202 -0
  104. package/stream-api/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  105. package/stream-api/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
  106. package/stream-api/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  107. package/stream-api/node_modules/@types/node/web-globals/events.d.ts +97 -0
  108. package/stream-api/node_modules/@types/node/web-globals/fetch.d.ts +50 -0
  109. package/stream-api/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
  110. package/stream-api/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  111. package/stream-api/node_modules/@types/node/web-globals/streams.d.ts +22 -0
  112. package/stream-api/node_modules/@types/node/worker_threads.d.ts +896 -0
  113. package/stream-api/node_modules/@types/node/zlib.d.ts +681 -0
  114. package/stream-api/node_modules/@types/qs/LICENSE +21 -0
  115. package/stream-api/node_modules/@types/qs/README.md +15 -0
  116. package/stream-api/node_modules/@types/qs/index.d.ts +82 -0
  117. package/stream-api/node_modules/@types/qs/package.json +66 -0
  118. package/stream-api/node_modules/@types/range-parser/LICENSE +21 -0
  119. package/stream-api/node_modules/@types/range-parser/README.md +53 -0
  120. package/stream-api/node_modules/@types/range-parser/index.d.ts +34 -0
  121. package/stream-api/node_modules/@types/range-parser/package.json +25 -0
  122. package/stream-api/node_modules/@types/send/LICENSE +21 -0
  123. package/stream-api/node_modules/@types/send/README.md +15 -0
  124. package/stream-api/node_modules/@types/send/index.d.ts +187 -0
  125. package/stream-api/node_modules/@types/send/package.json +38 -0
  126. package/stream-api/node_modules/@types/serve-static/LICENSE +21 -0
  127. package/stream-api/node_modules/@types/serve-static/README.md +15 -0
  128. package/stream-api/node_modules/@types/serve-static/index.d.ts +107 -0
  129. package/stream-api/node_modules/@types/serve-static/node_modules/@types/send/LICENSE +21 -0
  130. package/stream-api/node_modules/@types/serve-static/node_modules/@types/send/README.md +15 -0
  131. package/stream-api/node_modules/@types/serve-static/node_modules/@types/send/index.d.ts +225 -0
  132. package/stream-api/node_modules/@types/serve-static/node_modules/@types/send/package.json +39 -0
  133. package/stream-api/node_modules/@types/serve-static/package.json +45 -0
  134. package/stream-api/node_modules/accepts/HISTORY.md +250 -0
  135. package/stream-api/node_modules/accepts/LICENSE +23 -0
  136. package/stream-api/node_modules/accepts/README.md +140 -0
  137. package/stream-api/node_modules/accepts/index.js +238 -0
  138. package/stream-api/node_modules/accepts/package.json +47 -0
  139. package/stream-api/node_modules/any-base/LICENSE +21 -0
  140. package/stream-api/node_modules/any-base/README.md +55 -0
  141. package/stream-api/node_modules/any-base/dist/any-base.js +94 -0
  142. package/stream-api/node_modules/any-base/dist/any-base.min.js +1 -0
  143. package/stream-api/node_modules/any-base/index.js +30 -0
  144. package/stream-api/node_modules/any-base/package.json +40 -0
  145. package/stream-api/node_modules/any-base/src/converter.js +80 -0
  146. package/stream-api/node_modules/body-parser/LICENSE +23 -0
  147. package/stream-api/node_modules/body-parser/README.md +494 -0
  148. package/stream-api/node_modules/body-parser/index.js +80 -0
  149. package/stream-api/node_modules/body-parser/lib/read.js +250 -0
  150. package/stream-api/node_modules/body-parser/lib/types/json.js +166 -0
  151. package/stream-api/node_modules/body-parser/lib/types/raw.js +43 -0
  152. package/stream-api/node_modules/body-parser/lib/types/text.js +37 -0
  153. package/stream-api/node_modules/body-parser/lib/types/urlencoded.js +142 -0
  154. package/stream-api/node_modules/body-parser/lib/utils.js +96 -0
  155. package/stream-api/node_modules/body-parser/package.json +52 -0
  156. package/stream-api/node_modules/bytes/History.md +97 -0
  157. package/stream-api/node_modules/bytes/LICENSE +23 -0
  158. package/stream-api/node_modules/bytes/Readme.md +152 -0
  159. package/stream-api/node_modules/bytes/index.js +170 -0
  160. package/stream-api/node_modules/bytes/package.json +42 -0
  161. package/stream-api/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
  162. package/stream-api/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
  163. package/stream-api/node_modules/call-bind-apply-helpers/.nycrc +9 -0
  164. package/stream-api/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
  165. package/stream-api/node_modules/call-bind-apply-helpers/LICENSE +21 -0
  166. package/stream-api/node_modules/call-bind-apply-helpers/README.md +62 -0
  167. package/stream-api/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
  168. package/stream-api/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
  169. package/stream-api/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
  170. package/stream-api/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
  171. package/stream-api/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
  172. package/stream-api/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
  173. package/stream-api/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
  174. package/stream-api/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
  175. package/stream-api/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
  176. package/stream-api/node_modules/call-bind-apply-helpers/index.js +15 -0
  177. package/stream-api/node_modules/call-bind-apply-helpers/package.json +85 -0
  178. package/stream-api/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
  179. package/stream-api/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
  180. package/stream-api/node_modules/call-bind-apply-helpers/test/index.js +63 -0
  181. package/stream-api/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
  182. package/stream-api/node_modules/call-bound/.eslintrc +13 -0
  183. package/stream-api/node_modules/call-bound/.github/FUNDING.yml +12 -0
  184. package/stream-api/node_modules/call-bound/.nycrc +9 -0
  185. package/stream-api/node_modules/call-bound/CHANGELOG.md +42 -0
  186. package/stream-api/node_modules/call-bound/LICENSE +21 -0
  187. package/stream-api/node_modules/call-bound/README.md +53 -0
  188. package/stream-api/node_modules/call-bound/index.d.ts +94 -0
  189. package/stream-api/node_modules/call-bound/index.js +19 -0
  190. package/stream-api/node_modules/call-bound/package.json +99 -0
  191. package/stream-api/node_modules/call-bound/test/index.js +61 -0
  192. package/stream-api/node_modules/call-bound/tsconfig.json +10 -0
  193. package/stream-api/node_modules/commander/LICENSE +22 -0
  194. package/stream-api/node_modules/commander/Readme.md +1159 -0
  195. package/stream-api/node_modules/commander/esm.mjs +16 -0
  196. package/stream-api/node_modules/commander/index.js +24 -0
  197. package/stream-api/node_modules/commander/lib/argument.js +150 -0
  198. package/stream-api/node_modules/commander/lib/command.js +2777 -0
  199. package/stream-api/node_modules/commander/lib/error.js +39 -0
  200. package/stream-api/node_modules/commander/lib/help.js +747 -0
  201. package/stream-api/node_modules/commander/lib/option.js +380 -0
  202. package/stream-api/node_modules/commander/lib/suggestSimilar.js +101 -0
  203. package/stream-api/node_modules/commander/package-support.json +16 -0
  204. package/stream-api/node_modules/commander/package.json +82 -0
  205. package/stream-api/node_modules/commander/typings/esm.d.mts +3 -0
  206. package/stream-api/node_modules/commander/typings/index.d.ts +1113 -0
  207. package/stream-api/node_modules/content-disposition/HISTORY.md +72 -0
  208. package/stream-api/node_modules/content-disposition/LICENSE +22 -0
  209. package/stream-api/node_modules/content-disposition/README.md +142 -0
  210. package/stream-api/node_modules/content-disposition/index.js +458 -0
  211. package/stream-api/node_modules/content-disposition/package.json +43 -0
  212. package/stream-api/node_modules/content-type/HISTORY.md +29 -0
  213. package/stream-api/node_modules/content-type/LICENSE +22 -0
  214. package/stream-api/node_modules/content-type/README.md +94 -0
  215. package/stream-api/node_modules/content-type/index.js +225 -0
  216. package/stream-api/node_modules/content-type/package.json +42 -0
  217. package/stream-api/node_modules/cookie/LICENSE +24 -0
  218. package/stream-api/node_modules/cookie/README.md +317 -0
  219. package/stream-api/node_modules/cookie/SECURITY.md +25 -0
  220. package/stream-api/node_modules/cookie/index.js +335 -0
  221. package/stream-api/node_modules/cookie/package.json +44 -0
  222. package/stream-api/node_modules/cookie-signature/History.md +70 -0
  223. package/stream-api/node_modules/cookie-signature/LICENSE +22 -0
  224. package/stream-api/node_modules/cookie-signature/Readme.md +23 -0
  225. package/stream-api/node_modules/cookie-signature/index.js +47 -0
  226. package/stream-api/node_modules/cookie-signature/package.json +24 -0
  227. package/stream-api/node_modules/debug/LICENSE +20 -0
  228. package/stream-api/node_modules/debug/README.md +481 -0
  229. package/stream-api/node_modules/debug/package.json +64 -0
  230. package/stream-api/node_modules/debug/src/browser.js +272 -0
  231. package/stream-api/node_modules/debug/src/common.js +292 -0
  232. package/stream-api/node_modules/debug/src/index.js +10 -0
  233. package/stream-api/node_modules/debug/src/node.js +263 -0
  234. package/stream-api/node_modules/depd/History.md +103 -0
  235. package/stream-api/node_modules/depd/LICENSE +22 -0
  236. package/stream-api/node_modules/depd/Readme.md +280 -0
  237. package/stream-api/node_modules/depd/index.js +538 -0
  238. package/stream-api/node_modules/depd/lib/browser/index.js +77 -0
  239. package/stream-api/node_modules/depd/package.json +45 -0
  240. package/stream-api/node_modules/dunder-proto/.eslintrc +5 -0
  241. package/stream-api/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
  242. package/stream-api/node_modules/dunder-proto/.nycrc +13 -0
  243. package/stream-api/node_modules/dunder-proto/CHANGELOG.md +24 -0
  244. package/stream-api/node_modules/dunder-proto/LICENSE +21 -0
  245. package/stream-api/node_modules/dunder-proto/README.md +54 -0
  246. package/stream-api/node_modules/dunder-proto/get.d.ts +5 -0
  247. package/stream-api/node_modules/dunder-proto/get.js +30 -0
  248. package/stream-api/node_modules/dunder-proto/package.json +76 -0
  249. package/stream-api/node_modules/dunder-proto/set.d.ts +5 -0
  250. package/stream-api/node_modules/dunder-proto/set.js +35 -0
  251. package/stream-api/node_modules/dunder-proto/test/get.js +34 -0
  252. package/stream-api/node_modules/dunder-proto/test/index.js +4 -0
  253. package/stream-api/node_modules/dunder-proto/test/set.js +50 -0
  254. package/stream-api/node_modules/dunder-proto/tsconfig.json +9 -0
  255. package/stream-api/node_modules/ee-first/LICENSE +22 -0
  256. package/stream-api/node_modules/ee-first/README.md +80 -0
  257. package/stream-api/node_modules/ee-first/index.js +95 -0
  258. package/stream-api/node_modules/ee-first/package.json +29 -0
  259. package/stream-api/node_modules/encodeurl/LICENSE +22 -0
  260. package/stream-api/node_modules/encodeurl/README.md +109 -0
  261. package/stream-api/node_modules/encodeurl/index.js +60 -0
  262. package/stream-api/node_modules/encodeurl/package.json +40 -0
  263. package/stream-api/node_modules/es-define-property/.eslintrc +13 -0
  264. package/stream-api/node_modules/es-define-property/.github/FUNDING.yml +12 -0
  265. package/stream-api/node_modules/es-define-property/.nycrc +9 -0
  266. package/stream-api/node_modules/es-define-property/CHANGELOG.md +29 -0
  267. package/stream-api/node_modules/es-define-property/LICENSE +21 -0
  268. package/stream-api/node_modules/es-define-property/README.md +49 -0
  269. package/stream-api/node_modules/es-define-property/index.d.ts +3 -0
  270. package/stream-api/node_modules/es-define-property/index.js +14 -0
  271. package/stream-api/node_modules/es-define-property/package.json +81 -0
  272. package/stream-api/node_modules/es-define-property/test/index.js +56 -0
  273. package/stream-api/node_modules/es-define-property/tsconfig.json +10 -0
  274. package/stream-api/node_modules/es-errors/.eslintrc +5 -0
  275. package/stream-api/node_modules/es-errors/.github/FUNDING.yml +12 -0
  276. package/stream-api/node_modules/es-errors/CHANGELOG.md +40 -0
  277. package/stream-api/node_modules/es-errors/LICENSE +21 -0
  278. package/stream-api/node_modules/es-errors/README.md +55 -0
  279. package/stream-api/node_modules/es-errors/eval.d.ts +3 -0
  280. package/stream-api/node_modules/es-errors/eval.js +4 -0
  281. package/stream-api/node_modules/es-errors/index.d.ts +3 -0
  282. package/stream-api/node_modules/es-errors/index.js +4 -0
  283. package/stream-api/node_modules/es-errors/package.json +80 -0
  284. package/stream-api/node_modules/es-errors/range.d.ts +3 -0
  285. package/stream-api/node_modules/es-errors/range.js +4 -0
  286. package/stream-api/node_modules/es-errors/ref.d.ts +3 -0
  287. package/stream-api/node_modules/es-errors/ref.js +4 -0
  288. package/stream-api/node_modules/es-errors/syntax.d.ts +3 -0
  289. package/stream-api/node_modules/es-errors/syntax.js +4 -0
  290. package/stream-api/node_modules/es-errors/test/index.js +19 -0
  291. package/stream-api/node_modules/es-errors/tsconfig.json +49 -0
  292. package/stream-api/node_modules/es-errors/type.d.ts +3 -0
  293. package/stream-api/node_modules/es-errors/type.js +4 -0
  294. package/stream-api/node_modules/es-errors/uri.d.ts +3 -0
  295. package/stream-api/node_modules/es-errors/uri.js +4 -0
  296. package/stream-api/node_modules/es-object-atoms/.eslintrc +16 -0
  297. package/stream-api/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
  298. package/stream-api/node_modules/es-object-atoms/CHANGELOG.md +37 -0
  299. package/stream-api/node_modules/es-object-atoms/LICENSE +21 -0
  300. package/stream-api/node_modules/es-object-atoms/README.md +63 -0
  301. package/stream-api/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
  302. package/stream-api/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
  303. package/stream-api/node_modules/es-object-atoms/ToObject.d.ts +7 -0
  304. package/stream-api/node_modules/es-object-atoms/ToObject.js +10 -0
  305. package/stream-api/node_modules/es-object-atoms/index.d.ts +3 -0
  306. package/stream-api/node_modules/es-object-atoms/index.js +4 -0
  307. package/stream-api/node_modules/es-object-atoms/isObject.d.ts +3 -0
  308. package/stream-api/node_modules/es-object-atoms/isObject.js +6 -0
  309. package/stream-api/node_modules/es-object-atoms/package.json +80 -0
  310. package/stream-api/node_modules/es-object-atoms/test/index.js +38 -0
  311. package/stream-api/node_modules/es-object-atoms/tsconfig.json +6 -0
  312. package/stream-api/node_modules/escape-html/LICENSE +24 -0
  313. package/stream-api/node_modules/escape-html/Readme.md +43 -0
  314. package/stream-api/node_modules/escape-html/index.js +78 -0
  315. package/stream-api/node_modules/escape-html/package.json +24 -0
  316. package/stream-api/node_modules/etag/HISTORY.md +83 -0
  317. package/stream-api/node_modules/etag/LICENSE +22 -0
  318. package/stream-api/node_modules/etag/README.md +159 -0
  319. package/stream-api/node_modules/etag/index.js +131 -0
  320. package/stream-api/node_modules/etag/package.json +47 -0
  321. package/stream-api/node_modules/express/History.md +3858 -0
  322. package/stream-api/node_modules/express/LICENSE +24 -0
  323. package/stream-api/node_modules/express/Readme.md +266 -0
  324. package/stream-api/node_modules/express/index.js +11 -0
  325. package/stream-api/node_modules/express/lib/application.js +631 -0
  326. package/stream-api/node_modules/express/lib/express.js +81 -0
  327. package/stream-api/node_modules/express/lib/request.js +515 -0
  328. package/stream-api/node_modules/express/lib/response.js +1039 -0
  329. package/stream-api/node_modules/express/lib/utils.js +269 -0
  330. package/stream-api/node_modules/express/lib/view.js +205 -0
  331. package/stream-api/node_modules/express/package.json +98 -0
  332. package/stream-api/node_modules/finalhandler/HISTORY.md +233 -0
  333. package/stream-api/node_modules/finalhandler/LICENSE +22 -0
  334. package/stream-api/node_modules/finalhandler/README.md +147 -0
  335. package/stream-api/node_modules/finalhandler/index.js +293 -0
  336. package/stream-api/node_modules/finalhandler/package.json +43 -0
  337. package/stream-api/node_modules/forwarded/HISTORY.md +21 -0
  338. package/stream-api/node_modules/forwarded/LICENSE +22 -0
  339. package/stream-api/node_modules/forwarded/README.md +57 -0
  340. package/stream-api/node_modules/forwarded/index.js +90 -0
  341. package/stream-api/node_modules/forwarded/package.json +45 -0
  342. package/stream-api/node_modules/fresh/HISTORY.md +80 -0
  343. package/stream-api/node_modules/fresh/LICENSE +23 -0
  344. package/stream-api/node_modules/fresh/README.md +117 -0
  345. package/stream-api/node_modules/fresh/index.js +136 -0
  346. package/stream-api/node_modules/fresh/package.json +46 -0
  347. package/stream-api/node_modules/function-bind/.eslintrc +21 -0
  348. package/stream-api/node_modules/function-bind/.github/FUNDING.yml +12 -0
  349. package/stream-api/node_modules/function-bind/.github/SECURITY.md +3 -0
  350. package/stream-api/node_modules/function-bind/.nycrc +13 -0
  351. package/stream-api/node_modules/function-bind/CHANGELOG.md +136 -0
  352. package/stream-api/node_modules/function-bind/LICENSE +20 -0
  353. package/stream-api/node_modules/function-bind/README.md +46 -0
  354. package/stream-api/node_modules/function-bind/implementation.js +84 -0
  355. package/stream-api/node_modules/function-bind/index.js +5 -0
  356. package/stream-api/node_modules/function-bind/package.json +87 -0
  357. package/stream-api/node_modules/function-bind/test/.eslintrc +9 -0
  358. package/stream-api/node_modules/function-bind/test/index.js +252 -0
  359. package/stream-api/node_modules/get-intrinsic/.eslintrc +42 -0
  360. package/stream-api/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
  361. package/stream-api/node_modules/get-intrinsic/.nycrc +9 -0
  362. package/stream-api/node_modules/get-intrinsic/CHANGELOG.md +186 -0
  363. package/stream-api/node_modules/get-intrinsic/LICENSE +21 -0
  364. package/stream-api/node_modules/get-intrinsic/README.md +71 -0
  365. package/stream-api/node_modules/get-intrinsic/index.js +378 -0
  366. package/stream-api/node_modules/get-intrinsic/package.json +97 -0
  367. package/stream-api/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
  368. package/stream-api/node_modules/get-proto/.eslintrc +10 -0
  369. package/stream-api/node_modules/get-proto/.github/FUNDING.yml +12 -0
  370. package/stream-api/node_modules/get-proto/.nycrc +9 -0
  371. package/stream-api/node_modules/get-proto/CHANGELOG.md +21 -0
  372. package/stream-api/node_modules/get-proto/LICENSE +21 -0
  373. package/stream-api/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
  374. package/stream-api/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
  375. package/stream-api/node_modules/get-proto/README.md +50 -0
  376. package/stream-api/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
  377. package/stream-api/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
  378. package/stream-api/node_modules/get-proto/index.d.ts +5 -0
  379. package/stream-api/node_modules/get-proto/index.js +27 -0
  380. package/stream-api/node_modules/get-proto/package.json +81 -0
  381. package/stream-api/node_modules/get-proto/test/index.js +68 -0
  382. package/stream-api/node_modules/get-proto/tsconfig.json +9 -0
  383. package/stream-api/node_modules/gopd/.eslintrc +16 -0
  384. package/stream-api/node_modules/gopd/.github/FUNDING.yml +12 -0
  385. package/stream-api/node_modules/gopd/CHANGELOG.md +45 -0
  386. package/stream-api/node_modules/gopd/LICENSE +21 -0
  387. package/stream-api/node_modules/gopd/README.md +40 -0
  388. package/stream-api/node_modules/gopd/gOPD.d.ts +1 -0
  389. package/stream-api/node_modules/gopd/gOPD.js +4 -0
  390. package/stream-api/node_modules/gopd/index.d.ts +5 -0
  391. package/stream-api/node_modules/gopd/index.js +15 -0
  392. package/stream-api/node_modules/gopd/package.json +77 -0
  393. package/stream-api/node_modules/gopd/test/index.js +36 -0
  394. package/stream-api/node_modules/gopd/tsconfig.json +9 -0
  395. package/stream-api/node_modules/has-symbols/.eslintrc +11 -0
  396. package/stream-api/node_modules/has-symbols/.github/FUNDING.yml +12 -0
  397. package/stream-api/node_modules/has-symbols/.nycrc +9 -0
  398. package/stream-api/node_modules/has-symbols/CHANGELOG.md +91 -0
  399. package/stream-api/node_modules/has-symbols/LICENSE +21 -0
  400. package/stream-api/node_modules/has-symbols/README.md +46 -0
  401. package/stream-api/node_modules/has-symbols/index.d.ts +3 -0
  402. package/stream-api/node_modules/has-symbols/index.js +14 -0
  403. package/stream-api/node_modules/has-symbols/package.json +111 -0
  404. package/stream-api/node_modules/has-symbols/shams.d.ts +3 -0
  405. package/stream-api/node_modules/has-symbols/shams.js +45 -0
  406. package/stream-api/node_modules/has-symbols/test/index.js +22 -0
  407. package/stream-api/node_modules/has-symbols/test/shams/core-js.js +29 -0
  408. package/stream-api/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
  409. package/stream-api/node_modules/has-symbols/test/tests.js +58 -0
  410. package/stream-api/node_modules/has-symbols/tsconfig.json +10 -0
  411. package/stream-api/node_modules/hasown/.eslintrc +5 -0
  412. package/stream-api/node_modules/hasown/.github/FUNDING.yml +12 -0
  413. package/stream-api/node_modules/hasown/.nycrc +13 -0
  414. package/stream-api/node_modules/hasown/CHANGELOG.md +40 -0
  415. package/stream-api/node_modules/hasown/LICENSE +21 -0
  416. package/stream-api/node_modules/hasown/README.md +40 -0
  417. package/stream-api/node_modules/hasown/index.d.ts +3 -0
  418. package/stream-api/node_modules/hasown/index.js +8 -0
  419. package/stream-api/node_modules/hasown/package.json +92 -0
  420. package/stream-api/node_modules/hasown/tsconfig.json +6 -0
  421. package/stream-api/node_modules/http-errors/HISTORY.md +186 -0
  422. package/stream-api/node_modules/http-errors/LICENSE +23 -0
  423. package/stream-api/node_modules/http-errors/README.md +169 -0
  424. package/stream-api/node_modules/http-errors/index.js +290 -0
  425. package/stream-api/node_modules/http-errors/package.json +54 -0
  426. package/stream-api/node_modules/iconv-lite/Changelog.md +236 -0
  427. package/stream-api/node_modules/iconv-lite/LICENSE +21 -0
  428. package/stream-api/node_modules/iconv-lite/README.md +138 -0
  429. package/stream-api/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
  430. package/stream-api/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
  431. package/stream-api/node_modules/iconv-lite/encodings/index.js +23 -0
  432. package/stream-api/node_modules/iconv-lite/encodings/internal.js +218 -0
  433. package/stream-api/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
  434. package/stream-api/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
  435. package/stream-api/node_modules/iconv-lite/encodings/sbcs-data.js +178 -0
  436. package/stream-api/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
  437. package/stream-api/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
  438. package/stream-api/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
  439. package/stream-api/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
  440. package/stream-api/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
  441. package/stream-api/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
  442. package/stream-api/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
  443. package/stream-api/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
  444. package/stream-api/node_modules/iconv-lite/encodings/utf16.js +187 -0
  445. package/stream-api/node_modules/iconv-lite/encodings/utf32.js +307 -0
  446. package/stream-api/node_modules/iconv-lite/encodings/utf7.js +283 -0
  447. package/stream-api/node_modules/iconv-lite/lib/bom-handling.js +48 -0
  448. package/stream-api/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
  449. package/stream-api/node_modules/iconv-lite/lib/index.d.ts +41 -0
  450. package/stream-api/node_modules/iconv-lite/lib/index.js +183 -0
  451. package/stream-api/node_modules/iconv-lite/lib/streams.js +105 -0
  452. package/stream-api/node_modules/iconv-lite/package.json +59 -0
  453. package/stream-api/node_modules/inherits/LICENSE +16 -0
  454. package/stream-api/node_modules/inherits/README.md +42 -0
  455. package/stream-api/node_modules/inherits/inherits.js +9 -0
  456. package/stream-api/node_modules/inherits/inherits_browser.js +27 -0
  457. package/stream-api/node_modules/inherits/package.json +29 -0
  458. package/stream-api/node_modules/ipaddr.js/LICENSE +19 -0
  459. package/stream-api/node_modules/ipaddr.js/README.md +233 -0
  460. package/stream-api/node_modules/ipaddr.js/ipaddr.min.js +1 -0
  461. package/stream-api/node_modules/ipaddr.js/lib/ipaddr.js +673 -0
  462. package/stream-api/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
  463. package/stream-api/node_modules/ipaddr.js/package.json +35 -0
  464. package/stream-api/node_modules/is-promise/LICENSE +19 -0
  465. package/stream-api/node_modules/is-promise/index.d.ts +2 -0
  466. package/stream-api/node_modules/is-promise/index.js +6 -0
  467. package/stream-api/node_modules/is-promise/index.mjs +3 -0
  468. package/stream-api/node_modules/is-promise/package.json +30 -0
  469. package/stream-api/node_modules/is-promise/readme.md +33 -0
  470. package/stream-api/node_modules/math-intrinsics/.eslintrc +16 -0
  471. package/stream-api/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
  472. package/stream-api/node_modules/math-intrinsics/CHANGELOG.md +24 -0
  473. package/stream-api/node_modules/math-intrinsics/LICENSE +21 -0
  474. package/stream-api/node_modules/math-intrinsics/README.md +50 -0
  475. package/stream-api/node_modules/math-intrinsics/abs.d.ts +1 -0
  476. package/stream-api/node_modules/math-intrinsics/abs.js +4 -0
  477. package/stream-api/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
  478. package/stream-api/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
  479. package/stream-api/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
  480. package/stream-api/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
  481. package/stream-api/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
  482. package/stream-api/node_modules/math-intrinsics/constants/maxValue.js +5 -0
  483. package/stream-api/node_modules/math-intrinsics/floor.d.ts +1 -0
  484. package/stream-api/node_modules/math-intrinsics/floor.js +4 -0
  485. package/stream-api/node_modules/math-intrinsics/isFinite.d.ts +3 -0
  486. package/stream-api/node_modules/math-intrinsics/isFinite.js +12 -0
  487. package/stream-api/node_modules/math-intrinsics/isInteger.d.ts +3 -0
  488. package/stream-api/node_modules/math-intrinsics/isInteger.js +16 -0
  489. package/stream-api/node_modules/math-intrinsics/isNaN.d.ts +1 -0
  490. package/stream-api/node_modules/math-intrinsics/isNaN.js +6 -0
  491. package/stream-api/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
  492. package/stream-api/node_modules/math-intrinsics/isNegativeZero.js +6 -0
  493. package/stream-api/node_modules/math-intrinsics/max.d.ts +1 -0
  494. package/stream-api/node_modules/math-intrinsics/max.js +4 -0
  495. package/stream-api/node_modules/math-intrinsics/min.d.ts +1 -0
  496. package/stream-api/node_modules/math-intrinsics/min.js +4 -0
  497. package/stream-api/node_modules/math-intrinsics/mod.d.ts +3 -0
  498. package/stream-api/node_modules/math-intrinsics/mod.js +9 -0
  499. package/stream-api/node_modules/math-intrinsics/package.json +86 -0
  500. package/stream-api/node_modules/math-intrinsics/pow.d.ts +1 -0
  501. package/stream-api/node_modules/math-intrinsics/pow.js +4 -0
  502. package/stream-api/node_modules/math-intrinsics/round.d.ts +1 -0
  503. package/stream-api/node_modules/math-intrinsics/round.js +4 -0
  504. package/stream-api/node_modules/math-intrinsics/sign.d.ts +3 -0
  505. package/stream-api/node_modules/math-intrinsics/sign.js +11 -0
  506. package/stream-api/node_modules/math-intrinsics/test/index.js +192 -0
  507. package/stream-api/node_modules/math-intrinsics/tsconfig.json +3 -0
  508. package/stream-api/node_modules/media-typer/HISTORY.md +50 -0
  509. package/stream-api/node_modules/media-typer/LICENSE +22 -0
  510. package/stream-api/node_modules/media-typer/README.md +93 -0
  511. package/stream-api/node_modules/media-typer/index.js +143 -0
  512. package/stream-api/node_modules/media-typer/package.json +33 -0
  513. package/stream-api/node_modules/merge-descriptors/index.d.ts +11 -0
  514. package/stream-api/node_modules/merge-descriptors/index.js +26 -0
  515. package/stream-api/node_modules/merge-descriptors/license +11 -0
  516. package/stream-api/node_modules/merge-descriptors/package.json +50 -0
  517. package/stream-api/node_modules/merge-descriptors/readme.md +55 -0
  518. package/stream-api/node_modules/mime-db/HISTORY.md +541 -0
  519. package/stream-api/node_modules/mime-db/LICENSE +23 -0
  520. package/stream-api/node_modules/mime-db/README.md +109 -0
  521. package/stream-api/node_modules/mime-db/db.json +9342 -0
  522. package/stream-api/node_modules/mime-db/index.js +12 -0
  523. package/stream-api/node_modules/mime-db/package.json +56 -0
  524. package/stream-api/node_modules/mime-types/HISTORY.md +428 -0
  525. package/stream-api/node_modules/mime-types/LICENSE +23 -0
  526. package/stream-api/node_modules/mime-types/README.md +126 -0
  527. package/stream-api/node_modules/mime-types/index.js +211 -0
  528. package/stream-api/node_modules/mime-types/mimeScore.js +57 -0
  529. package/stream-api/node_modules/mime-types/package.json +49 -0
  530. package/stream-api/node_modules/ms/index.js +162 -0
  531. package/stream-api/node_modules/ms/license.md +21 -0
  532. package/stream-api/node_modules/ms/package.json +38 -0
  533. package/stream-api/node_modules/ms/readme.md +59 -0
  534. package/stream-api/node_modules/negotiator/HISTORY.md +114 -0
  535. package/stream-api/node_modules/negotiator/LICENSE +24 -0
  536. package/stream-api/node_modules/negotiator/README.md +212 -0
  537. package/stream-api/node_modules/negotiator/index.js +83 -0
  538. package/stream-api/node_modules/negotiator/lib/charset.js +169 -0
  539. package/stream-api/node_modules/negotiator/lib/encoding.js +205 -0
  540. package/stream-api/node_modules/negotiator/lib/language.js +179 -0
  541. package/stream-api/node_modules/negotiator/lib/mediaType.js +294 -0
  542. package/stream-api/node_modules/negotiator/package.json +43 -0
  543. package/stream-api/node_modules/object-inspect/.eslintrc +53 -0
  544. package/stream-api/node_modules/object-inspect/.github/FUNDING.yml +12 -0
  545. package/stream-api/node_modules/object-inspect/.nycrc +13 -0
  546. package/stream-api/node_modules/object-inspect/CHANGELOG.md +424 -0
  547. package/stream-api/node_modules/object-inspect/LICENSE +21 -0
  548. package/stream-api/node_modules/object-inspect/example/all.js +23 -0
  549. package/stream-api/node_modules/object-inspect/example/circular.js +6 -0
  550. package/stream-api/node_modules/object-inspect/example/fn.js +5 -0
  551. package/stream-api/node_modules/object-inspect/example/inspect.js +10 -0
  552. package/stream-api/node_modules/object-inspect/index.js +544 -0
  553. package/stream-api/node_modules/object-inspect/package-support.json +20 -0
  554. package/stream-api/node_modules/object-inspect/package.json +105 -0
  555. package/stream-api/node_modules/object-inspect/readme.markdown +84 -0
  556. package/stream-api/node_modules/object-inspect/test/bigint.js +58 -0
  557. package/stream-api/node_modules/object-inspect/test/browser/dom.js +15 -0
  558. package/stream-api/node_modules/object-inspect/test/circular.js +16 -0
  559. package/stream-api/node_modules/object-inspect/test/deep.js +12 -0
  560. package/stream-api/node_modules/object-inspect/test/element.js +53 -0
  561. package/stream-api/node_modules/object-inspect/test/err.js +48 -0
  562. package/stream-api/node_modules/object-inspect/test/fakes.js +29 -0
  563. package/stream-api/node_modules/object-inspect/test/fn.js +76 -0
  564. package/stream-api/node_modules/object-inspect/test/global.js +17 -0
  565. package/stream-api/node_modules/object-inspect/test/has.js +15 -0
  566. package/stream-api/node_modules/object-inspect/test/holes.js +15 -0
  567. package/stream-api/node_modules/object-inspect/test/indent-option.js +271 -0
  568. package/stream-api/node_modules/object-inspect/test/inspect.js +139 -0
  569. package/stream-api/node_modules/object-inspect/test/lowbyte.js +12 -0
  570. package/stream-api/node_modules/object-inspect/test/number.js +58 -0
  571. package/stream-api/node_modules/object-inspect/test/quoteStyle.js +26 -0
  572. package/stream-api/node_modules/object-inspect/test/toStringTag.js +40 -0
  573. package/stream-api/node_modules/object-inspect/test/undef.js +12 -0
  574. package/stream-api/node_modules/object-inspect/test/values.js +261 -0
  575. package/stream-api/node_modules/object-inspect/test-core-js.js +26 -0
  576. package/stream-api/node_modules/object-inspect/util.inspect.js +1 -0
  577. package/stream-api/node_modules/on-finished/HISTORY.md +98 -0
  578. package/stream-api/node_modules/on-finished/LICENSE +23 -0
  579. package/stream-api/node_modules/on-finished/README.md +162 -0
  580. package/stream-api/node_modules/on-finished/index.js +234 -0
  581. package/stream-api/node_modules/on-finished/package.json +39 -0
  582. package/stream-api/node_modules/once/LICENSE +15 -0
  583. package/stream-api/node_modules/once/README.md +79 -0
  584. package/stream-api/node_modules/once/once.js +42 -0
  585. package/stream-api/node_modules/once/package.json +33 -0
  586. package/stream-api/node_modules/parseurl/HISTORY.md +58 -0
  587. package/stream-api/node_modules/parseurl/LICENSE +24 -0
  588. package/stream-api/node_modules/parseurl/README.md +133 -0
  589. package/stream-api/node_modules/parseurl/index.js +158 -0
  590. package/stream-api/node_modules/parseurl/package.json +40 -0
  591. package/stream-api/node_modules/path-to-regexp/LICENSE +21 -0
  592. package/stream-api/node_modules/path-to-regexp/Readme.md +224 -0
  593. package/stream-api/node_modules/path-to-regexp/dist/index.d.ts +144 -0
  594. package/stream-api/node_modules/path-to-regexp/dist/index.js +409 -0
  595. package/stream-api/node_modules/path-to-regexp/dist/index.js.map +1 -0
  596. package/stream-api/node_modules/path-to-regexp/package.json +64 -0
  597. package/stream-api/node_modules/proxy-addr/HISTORY.md +161 -0
  598. package/stream-api/node_modules/proxy-addr/LICENSE +22 -0
  599. package/stream-api/node_modules/proxy-addr/README.md +139 -0
  600. package/stream-api/node_modules/proxy-addr/index.js +327 -0
  601. package/stream-api/node_modules/proxy-addr/package.json +47 -0
  602. package/stream-api/node_modules/qs/.editorconfig +46 -0
  603. package/stream-api/node_modules/qs/.eslintrc +39 -0
  604. package/stream-api/node_modules/qs/.github/FUNDING.yml +12 -0
  605. package/stream-api/node_modules/qs/.nycrc +13 -0
  606. package/stream-api/node_modules/qs/CHANGELOG.md +622 -0
  607. package/stream-api/node_modules/qs/LICENSE.md +29 -0
  608. package/stream-api/node_modules/qs/README.md +733 -0
  609. package/stream-api/node_modules/qs/dist/qs.js +141 -0
  610. package/stream-api/node_modules/qs/lib/formats.js +23 -0
  611. package/stream-api/node_modules/qs/lib/index.js +11 -0
  612. package/stream-api/node_modules/qs/lib/parse.js +328 -0
  613. package/stream-api/node_modules/qs/lib/stringify.js +356 -0
  614. package/stream-api/node_modules/qs/lib/utils.js +268 -0
  615. package/stream-api/node_modules/qs/package.json +93 -0
  616. package/stream-api/node_modules/qs/test/empty-keys-cases.js +267 -0
  617. package/stream-api/node_modules/qs/test/parse.js +1276 -0
  618. package/stream-api/node_modules/qs/test/stringify.js +1306 -0
  619. package/stream-api/node_modules/qs/test/utils.js +262 -0
  620. package/stream-api/node_modules/range-parser/HISTORY.md +56 -0
  621. package/stream-api/node_modules/range-parser/LICENSE +23 -0
  622. package/stream-api/node_modules/range-parser/README.md +84 -0
  623. package/stream-api/node_modules/range-parser/index.js +162 -0
  624. package/stream-api/node_modules/range-parser/package.json +44 -0
  625. package/stream-api/node_modules/raw-body/LICENSE +22 -0
  626. package/stream-api/node_modules/raw-body/README.md +223 -0
  627. package/stream-api/node_modules/raw-body/index.d.ts +85 -0
  628. package/stream-api/node_modules/raw-body/index.js +336 -0
  629. package/stream-api/node_modules/raw-body/package.json +46 -0
  630. package/stream-api/node_modules/router/HISTORY.md +228 -0
  631. package/stream-api/node_modules/router/LICENSE +23 -0
  632. package/stream-api/node_modules/router/README.md +416 -0
  633. package/stream-api/node_modules/router/index.js +748 -0
  634. package/stream-api/node_modules/router/lib/layer.js +247 -0
  635. package/stream-api/node_modules/router/lib/route.js +242 -0
  636. package/stream-api/node_modules/router/package.json +44 -0
  637. package/stream-api/node_modules/safer-buffer/LICENSE +21 -0
  638. package/stream-api/node_modules/safer-buffer/Porting-Buffer.md +268 -0
  639. package/stream-api/node_modules/safer-buffer/Readme.md +156 -0
  640. package/stream-api/node_modules/safer-buffer/dangerous.js +58 -0
  641. package/stream-api/node_modules/safer-buffer/package.json +34 -0
  642. package/stream-api/node_modules/safer-buffer/safer.js +77 -0
  643. package/stream-api/node_modules/safer-buffer/tests.js +406 -0
  644. package/stream-api/node_modules/send/HISTORY.md +580 -0
  645. package/stream-api/node_modules/send/LICENSE +23 -0
  646. package/stream-api/node_modules/send/README.md +317 -0
  647. package/stream-api/node_modules/send/index.js +997 -0
  648. package/stream-api/node_modules/send/package.json +60 -0
  649. package/stream-api/node_modules/serve-static/HISTORY.md +516 -0
  650. package/stream-api/node_modules/serve-static/LICENSE +25 -0
  651. package/stream-api/node_modules/serve-static/README.md +253 -0
  652. package/stream-api/node_modules/serve-static/index.js +208 -0
  653. package/stream-api/node_modules/serve-static/package.json +41 -0
  654. package/stream-api/node_modules/setprototypeof/LICENSE +13 -0
  655. package/stream-api/node_modules/setprototypeof/README.md +31 -0
  656. package/stream-api/node_modules/setprototypeof/index.d.ts +2 -0
  657. package/stream-api/node_modules/setprototypeof/index.js +17 -0
  658. package/stream-api/node_modules/setprototypeof/package.json +38 -0
  659. package/stream-api/node_modules/setprototypeof/test/index.js +24 -0
  660. package/stream-api/node_modules/short-uuid/.codeclimate.yml +21 -0
  661. package/stream-api/node_modules/short-uuid/.csslintrc +2 -0
  662. package/stream-api/node_modules/short-uuid/.editorconfig +11 -0
  663. package/stream-api/node_modules/short-uuid/.eslintrc.js +15 -0
  664. package/stream-api/node_modules/short-uuid/.github/workflows/node.js.yml +31 -0
  665. package/stream-api/node_modules/short-uuid/.nyc_output/3a60ecc2-69fc-4d0a-81dd-ad79b6071e14.json +1 -0
  666. package/stream-api/node_modules/short-uuid/.nyc_output/3f261446-c11a-4630-b995-4f5dbc1395ef.json +1 -0
  667. package/stream-api/node_modules/short-uuid/.nyc_output/processinfo/3a60ecc2-69fc-4d0a-81dd-ad79b6071e14.json +1 -0
  668. package/stream-api/node_modules/short-uuid/.nyc_output/processinfo/3f261446-c11a-4630-b995-4f5dbc1395ef.json +1 -0
  669. package/stream-api/node_modules/short-uuid/.nyc_output/processinfo/index.json +1 -0
  670. package/stream-api/node_modules/short-uuid/CHANGELOG.md +237 -0
  671. package/stream-api/node_modules/short-uuid/LICENSE +21 -0
  672. package/stream-api/node_modules/short-uuid/README.md +128 -0
  673. package/stream-api/node_modules/short-uuid/index.d.ts +51 -0
  674. package/stream-api/node_modules/short-uuid/index.js +157 -0
  675. package/stream-api/node_modules/short-uuid/package.json +41 -0
  676. package/stream-api/node_modules/short-uuid/revisions.md +193 -0
  677. package/stream-api/node_modules/short-uuid/test/index.js +339 -0
  678. package/stream-api/node_modules/short-uuid/test/uuid25examples.js +74 -0
  679. package/stream-api/node_modules/side-channel/.editorconfig +9 -0
  680. package/stream-api/node_modules/side-channel/.eslintrc +12 -0
  681. package/stream-api/node_modules/side-channel/.github/FUNDING.yml +12 -0
  682. package/stream-api/node_modules/side-channel/.nycrc +13 -0
  683. package/stream-api/node_modules/side-channel/CHANGELOG.md +110 -0
  684. package/stream-api/node_modules/side-channel/LICENSE +21 -0
  685. package/stream-api/node_modules/side-channel/README.md +61 -0
  686. package/stream-api/node_modules/side-channel/index.d.ts +14 -0
  687. package/stream-api/node_modules/side-channel/index.js +43 -0
  688. package/stream-api/node_modules/side-channel/package.json +85 -0
  689. package/stream-api/node_modules/side-channel/test/index.js +104 -0
  690. package/stream-api/node_modules/side-channel/tsconfig.json +9 -0
  691. package/stream-api/node_modules/side-channel-list/.editorconfig +9 -0
  692. package/stream-api/node_modules/side-channel-list/.eslintrc +11 -0
  693. package/stream-api/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
  694. package/stream-api/node_modules/side-channel-list/.nycrc +13 -0
  695. package/stream-api/node_modules/side-channel-list/CHANGELOG.md +15 -0
  696. package/stream-api/node_modules/side-channel-list/LICENSE +21 -0
  697. package/stream-api/node_modules/side-channel-list/README.md +62 -0
  698. package/stream-api/node_modules/side-channel-list/index.d.ts +13 -0
  699. package/stream-api/node_modules/side-channel-list/index.js +113 -0
  700. package/stream-api/node_modules/side-channel-list/list.d.ts +14 -0
  701. package/stream-api/node_modules/side-channel-list/package.json +77 -0
  702. package/stream-api/node_modules/side-channel-list/test/index.js +104 -0
  703. package/stream-api/node_modules/side-channel-list/tsconfig.json +9 -0
  704. package/stream-api/node_modules/side-channel-map/.editorconfig +9 -0
  705. package/stream-api/node_modules/side-channel-map/.eslintrc +11 -0
  706. package/stream-api/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
  707. package/stream-api/node_modules/side-channel-map/.nycrc +13 -0
  708. package/stream-api/node_modules/side-channel-map/CHANGELOG.md +22 -0
  709. package/stream-api/node_modules/side-channel-map/LICENSE +21 -0
  710. package/stream-api/node_modules/side-channel-map/README.md +62 -0
  711. package/stream-api/node_modules/side-channel-map/index.d.ts +15 -0
  712. package/stream-api/node_modules/side-channel-map/index.js +68 -0
  713. package/stream-api/node_modules/side-channel-map/package.json +80 -0
  714. package/stream-api/node_modules/side-channel-map/test/index.js +114 -0
  715. package/stream-api/node_modules/side-channel-map/tsconfig.json +9 -0
  716. package/stream-api/node_modules/side-channel-weakmap/.editorconfig +9 -0
  717. package/stream-api/node_modules/side-channel-weakmap/.eslintrc +12 -0
  718. package/stream-api/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
  719. package/stream-api/node_modules/side-channel-weakmap/.nycrc +13 -0
  720. package/stream-api/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
  721. package/stream-api/node_modules/side-channel-weakmap/LICENSE +21 -0
  722. package/stream-api/node_modules/side-channel-weakmap/README.md +62 -0
  723. package/stream-api/node_modules/side-channel-weakmap/index.d.ts +15 -0
  724. package/stream-api/node_modules/side-channel-weakmap/index.js +84 -0
  725. package/stream-api/node_modules/side-channel-weakmap/package.json +87 -0
  726. package/stream-api/node_modules/side-channel-weakmap/test/index.js +114 -0
  727. package/stream-api/node_modules/side-channel-weakmap/tsconfig.json +9 -0
  728. package/stream-api/node_modules/statuses/HISTORY.md +87 -0
  729. package/stream-api/node_modules/statuses/LICENSE +23 -0
  730. package/stream-api/node_modules/statuses/README.md +139 -0
  731. package/stream-api/node_modules/statuses/codes.json +65 -0
  732. package/stream-api/node_modules/statuses/index.js +146 -0
  733. package/stream-api/node_modules/statuses/package.json +49 -0
  734. package/stream-api/node_modules/toidentifier/HISTORY.md +9 -0
  735. package/stream-api/node_modules/toidentifier/LICENSE +21 -0
  736. package/stream-api/node_modules/toidentifier/README.md +61 -0
  737. package/stream-api/node_modules/toidentifier/index.js +32 -0
  738. package/stream-api/node_modules/toidentifier/package.json +38 -0
  739. package/stream-api/node_modules/type-is/HISTORY.md +292 -0
  740. package/stream-api/node_modules/type-is/LICENSE +23 -0
  741. package/stream-api/node_modules/type-is/README.md +198 -0
  742. package/stream-api/node_modules/type-is/index.js +250 -0
  743. package/stream-api/node_modules/type-is/package.json +47 -0
  744. package/stream-api/node_modules/undici-types/LICENSE +21 -0
  745. package/stream-api/node_modules/undici-types/README.md +6 -0
  746. package/stream-api/node_modules/undici-types/agent.d.ts +32 -0
  747. package/stream-api/node_modules/undici-types/api.d.ts +43 -0
  748. package/stream-api/node_modules/undici-types/balanced-pool.d.ts +29 -0
  749. package/stream-api/node_modules/undici-types/cache-interceptor.d.ts +172 -0
  750. package/stream-api/node_modules/undici-types/cache.d.ts +36 -0
  751. package/stream-api/node_modules/undici-types/client-stats.d.ts +15 -0
  752. package/stream-api/node_modules/undici-types/client.d.ts +108 -0
  753. package/stream-api/node_modules/undici-types/connector.d.ts +34 -0
  754. package/stream-api/node_modules/undici-types/content-type.d.ts +21 -0
  755. package/stream-api/node_modules/undici-types/cookies.d.ts +30 -0
  756. package/stream-api/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
  757. package/stream-api/node_modules/undici-types/dispatcher.d.ts +276 -0
  758. package/stream-api/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
  759. package/stream-api/node_modules/undici-types/errors.d.ts +161 -0
  760. package/stream-api/node_modules/undici-types/eventsource.d.ts +66 -0
  761. package/stream-api/node_modules/undici-types/fetch.d.ts +211 -0
  762. package/stream-api/node_modules/undici-types/formdata.d.ts +108 -0
  763. package/stream-api/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  764. package/stream-api/node_modules/undici-types/global-origin.d.ts +7 -0
  765. package/stream-api/node_modules/undici-types/h2c-client.d.ts +73 -0
  766. package/stream-api/node_modules/undici-types/handlers.d.ts +15 -0
  767. package/stream-api/node_modules/undici-types/header.d.ts +160 -0
  768. package/stream-api/node_modules/undici-types/index.d.ts +80 -0
  769. package/stream-api/node_modules/undici-types/interceptors.d.ts +39 -0
  770. package/stream-api/node_modules/undici-types/mock-agent.d.ts +68 -0
  771. package/stream-api/node_modules/undici-types/mock-call-history.d.ts +111 -0
  772. package/stream-api/node_modules/undici-types/mock-client.d.ts +27 -0
  773. package/stream-api/node_modules/undici-types/mock-errors.d.ts +12 -0
  774. package/stream-api/node_modules/undici-types/mock-interceptor.d.ts +94 -0
  775. package/stream-api/node_modules/undici-types/mock-pool.d.ts +27 -0
  776. package/stream-api/node_modules/undici-types/package.json +55 -0
  777. package/stream-api/node_modules/undici-types/patch.d.ts +29 -0
  778. package/stream-api/node_modules/undici-types/pool-stats.d.ts +19 -0
  779. package/stream-api/node_modules/undici-types/pool.d.ts +41 -0
  780. package/stream-api/node_modules/undici-types/proxy-agent.d.ts +29 -0
  781. package/stream-api/node_modules/undici-types/readable.d.ts +68 -0
  782. package/stream-api/node_modules/undici-types/retry-agent.d.ts +8 -0
  783. package/stream-api/node_modules/undici-types/retry-handler.d.ts +125 -0
  784. package/stream-api/node_modules/undici-types/snapshot-agent.d.ts +109 -0
  785. package/stream-api/node_modules/undici-types/util.d.ts +18 -0
  786. package/stream-api/node_modules/undici-types/utility.d.ts +7 -0
  787. package/stream-api/node_modules/undici-types/webidl.d.ts +341 -0
  788. package/stream-api/node_modules/undici-types/websocket.d.ts +186 -0
  789. package/stream-api/node_modules/unpipe/HISTORY.md +4 -0
  790. package/stream-api/node_modules/unpipe/LICENSE +22 -0
  791. package/stream-api/node_modules/unpipe/README.md +43 -0
  792. package/stream-api/node_modules/unpipe/index.js +69 -0
  793. package/stream-api/node_modules/unpipe/package.json +27 -0
  794. package/stream-api/node_modules/uuid/CHANGELOG.md +274 -0
  795. package/stream-api/node_modules/uuid/CONTRIBUTING.md +18 -0
  796. package/stream-api/node_modules/uuid/LICENSE.md +9 -0
  797. package/stream-api/node_modules/uuid/README.md +466 -0
  798. package/stream-api/node_modules/uuid/dist/bin/uuid +2 -0
  799. package/stream-api/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
  800. package/stream-api/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
  801. package/stream-api/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
  802. package/stream-api/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
  803. package/stream-api/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
  804. package/stream-api/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
  805. package/stream-api/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
  806. package/stream-api/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
  807. package/stream-api/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
  808. package/stream-api/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
  809. package/stream-api/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
  810. package/stream-api/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
  811. package/stream-api/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
  812. package/stream-api/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
  813. package/stream-api/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
  814. package/stream-api/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
  815. package/stream-api/node_modules/uuid/dist/esm-browser/index.js +9 -0
  816. package/stream-api/node_modules/uuid/dist/esm-browser/md5.js +215 -0
  817. package/stream-api/node_modules/uuid/dist/esm-browser/native.js +4 -0
  818. package/stream-api/node_modules/uuid/dist/esm-browser/nil.js +1 -0
  819. package/stream-api/node_modules/uuid/dist/esm-browser/parse.js +35 -0
  820. package/stream-api/node_modules/uuid/dist/esm-browser/regex.js +1 -0
  821. package/stream-api/node_modules/uuid/dist/esm-browser/rng.js +18 -0
  822. package/stream-api/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
  823. package/stream-api/node_modules/uuid/dist/esm-browser/stringify.js +33 -0
  824. package/stream-api/node_modules/uuid/dist/esm-browser/v1.js +95 -0
  825. package/stream-api/node_modules/uuid/dist/esm-browser/v3.js +4 -0
  826. package/stream-api/node_modules/uuid/dist/esm-browser/v35.js +66 -0
  827. package/stream-api/node_modules/uuid/dist/esm-browser/v4.js +29 -0
  828. package/stream-api/node_modules/uuid/dist/esm-browser/v5.js +4 -0
  829. package/stream-api/node_modules/uuid/dist/esm-browser/validate.js +7 -0
  830. package/stream-api/node_modules/uuid/dist/esm-browser/version.js +11 -0
  831. package/stream-api/node_modules/uuid/dist/esm-node/index.js +9 -0
  832. package/stream-api/node_modules/uuid/dist/esm-node/md5.js +13 -0
  833. package/stream-api/node_modules/uuid/dist/esm-node/native.js +4 -0
  834. package/stream-api/node_modules/uuid/dist/esm-node/nil.js +1 -0
  835. package/stream-api/node_modules/uuid/dist/esm-node/parse.js +35 -0
  836. package/stream-api/node_modules/uuid/dist/esm-node/regex.js +1 -0
  837. package/stream-api/node_modules/uuid/dist/esm-node/rng.js +12 -0
  838. package/stream-api/node_modules/uuid/dist/esm-node/sha1.js +13 -0
  839. package/stream-api/node_modules/uuid/dist/esm-node/stringify.js +33 -0
  840. package/stream-api/node_modules/uuid/dist/esm-node/v1.js +95 -0
  841. package/stream-api/node_modules/uuid/dist/esm-node/v3.js +4 -0
  842. package/stream-api/node_modules/uuid/dist/esm-node/v35.js +66 -0
  843. package/stream-api/node_modules/uuid/dist/esm-node/v4.js +29 -0
  844. package/stream-api/node_modules/uuid/dist/esm-node/v5.js +4 -0
  845. package/stream-api/node_modules/uuid/dist/esm-node/validate.js +7 -0
  846. package/stream-api/node_modules/uuid/dist/esm-node/version.js +11 -0
  847. package/stream-api/node_modules/uuid/dist/index.js +79 -0
  848. package/stream-api/node_modules/uuid/dist/md5-browser.js +223 -0
  849. package/stream-api/node_modules/uuid/dist/md5.js +23 -0
  850. package/stream-api/node_modules/uuid/dist/native-browser.js +11 -0
  851. package/stream-api/node_modules/uuid/dist/native.js +15 -0
  852. package/stream-api/node_modules/uuid/dist/nil.js +8 -0
  853. package/stream-api/node_modules/uuid/dist/parse.js +45 -0
  854. package/stream-api/node_modules/uuid/dist/regex.js +8 -0
  855. package/stream-api/node_modules/uuid/dist/rng-browser.js +25 -0
  856. package/stream-api/node_modules/uuid/dist/rng.js +24 -0
  857. package/stream-api/node_modules/uuid/dist/sha1-browser.js +104 -0
  858. package/stream-api/node_modules/uuid/dist/sha1.js +23 -0
  859. package/stream-api/node_modules/uuid/dist/stringify.js +44 -0
  860. package/stream-api/node_modules/uuid/dist/uuid-bin.js +85 -0
  861. package/stream-api/node_modules/uuid/dist/v1.js +107 -0
  862. package/stream-api/node_modules/uuid/dist/v3.js +16 -0
  863. package/stream-api/node_modules/uuid/dist/v35.js +80 -0
  864. package/stream-api/node_modules/uuid/dist/v4.js +43 -0
  865. package/stream-api/node_modules/uuid/dist/v5.js +16 -0
  866. package/stream-api/node_modules/uuid/dist/validate.js +17 -0
  867. package/stream-api/node_modules/uuid/dist/version.js +21 -0
  868. package/stream-api/node_modules/uuid/package.json +135 -0
  869. package/stream-api/node_modules/uuid/wrapper.mjs +10 -0
  870. package/stream-api/node_modules/vary/HISTORY.md +39 -0
  871. package/stream-api/node_modules/vary/LICENSE +22 -0
  872. package/stream-api/node_modules/vary/README.md +101 -0
  873. package/stream-api/node_modules/vary/index.js +149 -0
  874. package/stream-api/node_modules/vary/package.json +43 -0
  875. package/stream-api/node_modules/wrappy/LICENSE +15 -0
  876. package/stream-api/node_modules/wrappy/README.md +36 -0
  877. package/stream-api/node_modules/wrappy/package.json +29 -0
  878. package/stream-api/node_modules/wrappy/wrappy.js +33 -0
  879. package/stream-api/package-lock.json +985 -0
  880. package/stream-api/package.json +25 -0
  881. package/stream-api/tsconfig.json +10 -0
@@ -0,0 +1,2325 @@
1
+ /**
2
+ * The `node:util` module supports the needs of Node.js internal APIs. Many of the
3
+ * utilities are useful for application and module developers as well. To access
4
+ * it:
5
+ *
6
+ * ```js
7
+ * import util from 'node:util';
8
+ * ```
9
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/util.js)
10
+ */
11
+ declare module "util" {
12
+ import * as types from "node:util/types";
13
+ export interface InspectOptions {
14
+ /**
15
+ * If `true`, object's non-enumerable symbols and properties are included in the formatted result.
16
+ * `WeakMap` and `WeakSet` entries are also included as well as user defined prototype properties (excluding method properties).
17
+ * @default false
18
+ */
19
+ showHidden?: boolean | undefined;
20
+ /**
21
+ * Specifies the number of times to recurse while formatting object.
22
+ * This is useful for inspecting large objects.
23
+ * To recurse up to the maximum call stack size pass `Infinity` or `null`.
24
+ * @default 2
25
+ */
26
+ depth?: number | null | undefined;
27
+ /**
28
+ * If `true`, the output is styled with ANSI color codes. Colors are customizable.
29
+ */
30
+ colors?: boolean | undefined;
31
+ /**
32
+ * If `false`, `[util.inspect.custom](depth, opts, inspect)` functions are not invoked.
33
+ * @default true
34
+ */
35
+ customInspect?: boolean | undefined;
36
+ /**
37
+ * If `true`, `Proxy` inspection includes the target and handler objects.
38
+ * @default false
39
+ */
40
+ showProxy?: boolean | undefined;
41
+ /**
42
+ * Specifies the maximum number of `Array`, `TypedArray`, `WeakMap`, and `WeakSet` elements
43
+ * to include when formatting. Set to `null` or `Infinity` to show all elements.
44
+ * Set to `0` or negative to show no elements.
45
+ * @default 100
46
+ */
47
+ maxArrayLength?: number | null | undefined;
48
+ /**
49
+ * Specifies the maximum number of characters to
50
+ * include when formatting. Set to `null` or `Infinity` to show all elements.
51
+ * Set to `0` or negative to show no characters.
52
+ * @default 10000
53
+ */
54
+ maxStringLength?: number | null | undefined;
55
+ /**
56
+ * The length at which input values are split across multiple lines.
57
+ * Set to `Infinity` to format the input as a single line
58
+ * (in combination with `compact` set to `true` or any number >= `1`).
59
+ * @default 80
60
+ */
61
+ breakLength?: number | undefined;
62
+ /**
63
+ * Setting this to `false` causes each object key
64
+ * to be displayed on a new line. It will also add new lines to text that is
65
+ * longer than `breakLength`. If set to a number, the most `n` inner elements
66
+ * are united on a single line as long as all properties fit into
67
+ * `breakLength`. Short array elements are also grouped together. Note that no
68
+ * text will be reduced below 16 characters, no matter the `breakLength` size.
69
+ * For more information, see the example below.
70
+ * @default true
71
+ */
72
+ compact?: boolean | number | undefined;
73
+ /**
74
+ * If set to `true` or a function, all properties of an object, and `Set` and `Map`
75
+ * entries are sorted in the resulting string.
76
+ * If set to `true` the default sort is used.
77
+ * If set to a function, it is used as a compare function.
78
+ */
79
+ sorted?: boolean | ((a: string, b: string) => number) | undefined;
80
+ /**
81
+ * If set to `true`, getters are going to be
82
+ * inspected as well. If set to `'get'` only getters without setter are going
83
+ * to be inspected. If set to `'set'` only getters having a corresponding
84
+ * setter are going to be inspected. This might cause side effects depending on
85
+ * the getter function.
86
+ * @default false
87
+ */
88
+ getters?: "get" | "set" | boolean | undefined;
89
+ /**
90
+ * If set to `true`, an underscore is used to separate every three digits in all bigints and numbers.
91
+ * @default false
92
+ */
93
+ numericSeparator?: boolean | undefined;
94
+ }
95
+ export type Style =
96
+ | "special"
97
+ | "number"
98
+ | "bigint"
99
+ | "boolean"
100
+ | "undefined"
101
+ | "null"
102
+ | "string"
103
+ | "symbol"
104
+ | "date"
105
+ | "regexp"
106
+ | "module";
107
+ export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => any; // TODO: , inspect: inspect
108
+ export interface InspectOptionsStylized extends InspectOptions {
109
+ stylize(text: string, styleType: Style): string;
110
+ }
111
+ export interface CallSiteObject {
112
+ /**
113
+ * Returns the name of the function associated with this call site.
114
+ */
115
+ functionName: string;
116
+ /**
117
+ * Returns the name of the resource that contains the script for the
118
+ * function for this call site.
119
+ */
120
+ scriptName: string;
121
+ /**
122
+ * Returns the unique id of the script, as in Chrome DevTools protocol
123
+ * [`Runtime.ScriptId`](https://chromedevtools.github.io/devtools-protocol/1-3/Runtime/#type-ScriptId).
124
+ * @since v22.14.0
125
+ */
126
+ scriptId: string;
127
+ /**
128
+ * Returns the number, 1-based, of the line for the associate function call.
129
+ */
130
+ lineNumber: number;
131
+ /**
132
+ * Returns the 1-based column offset on the line for the associated function call.
133
+ */
134
+ columnNumber: number;
135
+ }
136
+ export type DiffEntry = [operation: -1 | 0 | 1, value: string];
137
+ /**
138
+ * `util.diff()` compares two string or array values and returns an array of difference entries.
139
+ * It uses the Myers diff algorithm to compute minimal differences, which is the same algorithm
140
+ * used internally by assertion error messages.
141
+ *
142
+ * If the values are equal, an empty array is returned.
143
+ *
144
+ * ```js
145
+ * const { diff } = require('node:util');
146
+ *
147
+ * // Comparing strings
148
+ * const actualString = '12345678';
149
+ * const expectedString = '12!!5!7!';
150
+ * console.log(diff(actualString, expectedString));
151
+ * // [
152
+ * // [0, '1'],
153
+ * // [0, '2'],
154
+ * // [1, '3'],
155
+ * // [1, '4'],
156
+ * // [-1, '!'],
157
+ * // [-1, '!'],
158
+ * // [0, '5'],
159
+ * // [1, '6'],
160
+ * // [-1, '!'],
161
+ * // [0, '7'],
162
+ * // [1, '8'],
163
+ * // [-1, '!'],
164
+ * // ]
165
+ * // Comparing arrays
166
+ * const actualArray = ['1', '2', '3'];
167
+ * const expectedArray = ['1', '3', '4'];
168
+ * console.log(diff(actualArray, expectedArray));
169
+ * // [
170
+ * // [0, '1'],
171
+ * // [1, '2'],
172
+ * // [0, '3'],
173
+ * // [-1, '4'],
174
+ * // ]
175
+ * // Equal values return empty array
176
+ * console.log(diff('same', 'same'));
177
+ * // []
178
+ * ```
179
+ * @since v22.15.0
180
+ * @experimental
181
+ * @param actual The first value to compare
182
+ * @param expected The second value to compare
183
+ * @returns An array of difference entries. Each entry is an array with two elements:
184
+ * * Index 0: `number` Operation code: `-1` for delete, `0` for no-op/unchanged, `1` for insert
185
+ * * Index 1: `string` The value associated with the operation
186
+ */
187
+ export function diff(actual: string | readonly string[], expected: string | readonly string[]): DiffEntry[];
188
+ /**
189
+ * The `util.format()` method returns a formatted string using the first argument
190
+ * as a `printf`-like format string which can contain zero or more format
191
+ * specifiers. Each specifier is replaced with the converted value from the
192
+ * corresponding argument. Supported specifiers are:
193
+ *
194
+ * If a specifier does not have a corresponding argument, it is not replaced:
195
+ *
196
+ * ```js
197
+ * util.format('%s:%s', 'foo');
198
+ * // Returns: 'foo:%s'
199
+ * ```
200
+ *
201
+ * Values that are not part of the format string are formatted using `util.inspect()` if their type is not `string`.
202
+ *
203
+ * If there are more arguments passed to the `util.format()` method than the
204
+ * number of specifiers, the extra arguments are concatenated to the returned
205
+ * string, separated by spaces:
206
+ *
207
+ * ```js
208
+ * util.format('%s:%s', 'foo', 'bar', 'baz');
209
+ * // Returns: 'foo:bar baz'
210
+ * ```
211
+ *
212
+ * If the first argument does not contain a valid format specifier, `util.format()` returns a string that is the concatenation of all arguments separated by spaces:
213
+ *
214
+ * ```js
215
+ * util.format(1, 2, 3);
216
+ * // Returns: '1 2 3'
217
+ * ```
218
+ *
219
+ * If only one argument is passed to `util.format()`, it is returned as it is
220
+ * without any formatting:
221
+ *
222
+ * ```js
223
+ * util.format('%% %s');
224
+ * // Returns: '%% %s'
225
+ * ```
226
+ *
227
+ * `util.format()` is a synchronous method that is intended as a debugging tool.
228
+ * Some input values can have a significant performance overhead that can block the
229
+ * event loop. Use this function with care and never in a hot code path.
230
+ * @since v0.5.3
231
+ * @param format A `printf`-like format string.
232
+ */
233
+ export function format(format?: any, ...param: any[]): string;
234
+ /**
235
+ * This function is identical to {@link format}, except in that it takes
236
+ * an `inspectOptions` argument which specifies options that are passed along to {@link inspect}.
237
+ *
238
+ * ```js
239
+ * util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 });
240
+ * // Returns 'See object { foo: 42 }', where `42` is colored as a number
241
+ * // when printed to a terminal.
242
+ * ```
243
+ * @since v10.0.0
244
+ */
245
+ export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
246
+ interface GetCallSitesOptions {
247
+ /**
248
+ * Reconstruct the original location in the stacktrace from the source-map.
249
+ * Enabled by default with the flag `--enable-source-maps`.
250
+ */
251
+ sourceMap?: boolean | undefined;
252
+ }
253
+ /**
254
+ * Returns an array of call site objects containing the stack of
255
+ * the caller function.
256
+ *
257
+ * ```js
258
+ * import { getCallSites } from 'node:util';
259
+ *
260
+ * function exampleFunction() {
261
+ * const callSites = getCallSites();
262
+ *
263
+ * console.log('Call Sites:');
264
+ * callSites.forEach((callSite, index) => {
265
+ * console.log(`CallSite ${index + 1}:`);
266
+ * console.log(`Function Name: ${callSite.functionName}`);
267
+ * console.log(`Script Name: ${callSite.scriptName}`);
268
+ * console.log(`Line Number: ${callSite.lineNumber}`);
269
+ * console.log(`Column Number: ${callSite.column}`);
270
+ * });
271
+ * // CallSite 1:
272
+ * // Function Name: exampleFunction
273
+ * // Script Name: /home/example.js
274
+ * // Line Number: 5
275
+ * // Column Number: 26
276
+ *
277
+ * // CallSite 2:
278
+ * // Function Name: anotherFunction
279
+ * // Script Name: /home/example.js
280
+ * // Line Number: 22
281
+ * // Column Number: 3
282
+ *
283
+ * // ...
284
+ * }
285
+ *
286
+ * // A function to simulate another stack layer
287
+ * function anotherFunction() {
288
+ * exampleFunction();
289
+ * }
290
+ *
291
+ * anotherFunction();
292
+ * ```
293
+ *
294
+ * It is possible to reconstruct the original locations by setting the option `sourceMap` to `true`.
295
+ * If the source map is not available, the original location will be the same as the current location.
296
+ * When the `--enable-source-maps` flag is enabled, for example when using `--experimental-transform-types`,
297
+ * `sourceMap` will be true by default.
298
+ *
299
+ * ```ts
300
+ * import { getCallSites } from 'node:util';
301
+ *
302
+ * interface Foo {
303
+ * foo: string;
304
+ * }
305
+ *
306
+ * const callSites = getCallSites({ sourceMap: true });
307
+ *
308
+ * // With sourceMap:
309
+ * // Function Name: ''
310
+ * // Script Name: example.js
311
+ * // Line Number: 7
312
+ * // Column Number: 26
313
+ *
314
+ * // Without sourceMap:
315
+ * // Function Name: ''
316
+ * // Script Name: example.js
317
+ * // Line Number: 2
318
+ * // Column Number: 26
319
+ * ```
320
+ * @param frameCount Number of frames to capture as call site objects.
321
+ * **Default:** `10`. Allowable range is between 1 and 200.
322
+ * @return An array of call site objects
323
+ * @since v22.9.0
324
+ */
325
+ export function getCallSites(frameCount?: number, options?: GetCallSitesOptions): CallSiteObject[];
326
+ export function getCallSites(options: GetCallSitesOptions): CallSiteObject[];
327
+ /**
328
+ * Returns the string name for a numeric error code that comes from a Node.js API.
329
+ * The mapping between error codes and error names is platform-dependent.
330
+ * See `Common System Errors` for the names of common errors.
331
+ *
332
+ * ```js
333
+ * fs.access('file/that/does/not/exist', (err) => {
334
+ * const name = util.getSystemErrorName(err.errno);
335
+ * console.error(name); // ENOENT
336
+ * });
337
+ * ```
338
+ * @since v9.7.0
339
+ */
340
+ export function getSystemErrorName(err: number): string;
341
+ /**
342
+ * Enable or disable printing a stack trace on `SIGINT`. The API is only available on the main thread.
343
+ * @since 24.6.0
344
+ */
345
+ export function setTraceSigInt(enable: boolean): void;
346
+ /**
347
+ * Returns a Map of all system error codes available from the Node.js API.
348
+ * The mapping between error codes and error names is platform-dependent.
349
+ * See `Common System Errors` for the names of common errors.
350
+ *
351
+ * ```js
352
+ * fs.access('file/that/does/not/exist', (err) => {
353
+ * const errorMap = util.getSystemErrorMap();
354
+ * const name = errorMap.get(err.errno);
355
+ * console.error(name); // ENOENT
356
+ * });
357
+ * ```
358
+ * @since v16.0.0, v14.17.0
359
+ */
360
+ export function getSystemErrorMap(): Map<number, [string, string]>;
361
+ /**
362
+ * Returns the string message for a numeric error code that comes from a Node.js
363
+ * API.
364
+ * The mapping between error codes and string messages is platform-dependent.
365
+ *
366
+ * ```js
367
+ * fs.access('file/that/does/not/exist', (err) => {
368
+ * const message = util.getSystemErrorMessage(err.errno);
369
+ * console.error(message); // no such file or directory
370
+ * });
371
+ * ```
372
+ * @since v22.12.0
373
+ */
374
+ export function getSystemErrorMessage(err: number): string;
375
+ /**
376
+ * Returns the `string` after replacing any surrogate code points
377
+ * (or equivalently, any unpaired surrogate code units) with the
378
+ * Unicode "replacement character" U+FFFD.
379
+ * @since v16.8.0, v14.18.0
380
+ */
381
+ export function toUSVString(string: string): string;
382
+ /**
383
+ * Creates and returns an `AbortController` instance whose `AbortSignal` is marked
384
+ * as transferable and can be used with `structuredClone()` or `postMessage()`.
385
+ * @since v18.11.0
386
+ * @returns A transferable AbortController
387
+ */
388
+ export function transferableAbortController(): AbortController;
389
+ /**
390
+ * Marks the given `AbortSignal` as transferable so that it can be used with`structuredClone()` and `postMessage()`.
391
+ *
392
+ * ```js
393
+ * const signal = transferableAbortSignal(AbortSignal.timeout(100));
394
+ * const channel = new MessageChannel();
395
+ * channel.port2.postMessage(signal, [signal]);
396
+ * ```
397
+ * @since v18.11.0
398
+ * @param signal The AbortSignal
399
+ * @returns The same AbortSignal
400
+ */
401
+ export function transferableAbortSignal(signal: AbortSignal): AbortSignal;
402
+ /**
403
+ * Listens to abort event on the provided `signal` and returns a promise that resolves when the `signal` is aborted.
404
+ * If `resource` is provided, it weakly references the operation's associated object,
405
+ * so if `resource` is garbage collected before the `signal` aborts,
406
+ * then returned promise shall remain pending.
407
+ * This prevents memory leaks in long-running or non-cancelable operations.
408
+ *
409
+ * ```js
410
+ * import { aborted } from 'node:util';
411
+ *
412
+ * // Obtain an object with an abortable signal, like a custom resource or operation.
413
+ * const dependent = obtainSomethingAbortable();
414
+ *
415
+ * // Pass `dependent` as the resource, indicating the promise should only resolve
416
+ * // if `dependent` is still in memory when the signal is aborted.
417
+ * aborted(dependent.signal, dependent).then(() => {
418
+ * // This code runs when `dependent` is aborted.
419
+ * console.log('Dependent resource was aborted.');
420
+ * });
421
+ *
422
+ * // Simulate an event that triggers the abort.
423
+ * dependent.on('event', () => {
424
+ * dependent.abort(); // This will cause the `aborted` promise to resolve.
425
+ * });
426
+ * ```
427
+ * @since v19.7.0
428
+ * @param resource Any non-null object tied to the abortable operation and held weakly.
429
+ * If `resource` is garbage collected before the `signal` aborts, the promise remains pending,
430
+ * allowing Node.js to stop tracking it.
431
+ * This helps prevent memory leaks in long-running or non-cancelable operations.
432
+ */
433
+ export function aborted(signal: AbortSignal, resource: any): Promise<void>;
434
+ /**
435
+ * The `util.inspect()` method returns a string representation of `object` that is
436
+ * intended for debugging. The output of `util.inspect` may change at any time
437
+ * and should not be depended upon programmatically. Additional `options` may be
438
+ * passed that alter the result.
439
+ * `util.inspect()` will use the constructor's name and/or `Symbol.toStringTag`
440
+ * property to make an identifiable tag for an inspected value.
441
+ *
442
+ * ```js
443
+ * class Foo {
444
+ * get [Symbol.toStringTag]() {
445
+ * return 'bar';
446
+ * }
447
+ * }
448
+ *
449
+ * class Bar {}
450
+ *
451
+ * const baz = Object.create(null, { [Symbol.toStringTag]: { value: 'foo' } });
452
+ *
453
+ * util.inspect(new Foo()); // 'Foo [bar] {}'
454
+ * util.inspect(new Bar()); // 'Bar {}'
455
+ * util.inspect(baz); // '[foo] {}'
456
+ * ```
457
+ *
458
+ * Circular references point to their anchor by using a reference index:
459
+ *
460
+ * ```js
461
+ * import { inspect } from 'node:util';
462
+ *
463
+ * const obj = {};
464
+ * obj.a = [obj];
465
+ * obj.b = {};
466
+ * obj.b.inner = obj.b;
467
+ * obj.b.obj = obj;
468
+ *
469
+ * console.log(inspect(obj));
470
+ * // <ref *1> {
471
+ * // a: [ [Circular *1] ],
472
+ * // b: <ref *2> { inner: [Circular *2], obj: [Circular *1] }
473
+ * // }
474
+ * ```
475
+ *
476
+ * The following example inspects all properties of the `util` object:
477
+ *
478
+ * ```js
479
+ * import util from 'node:util';
480
+ *
481
+ * console.log(util.inspect(util, { showHidden: true, depth: null }));
482
+ * ```
483
+ *
484
+ * The following example highlights the effect of the `compact` option:
485
+ *
486
+ * ```js
487
+ * import { inspect } from 'node:util';
488
+ *
489
+ * const o = {
490
+ * a: [1, 2, [[
491
+ * 'Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit, sed do ' +
492
+ * 'eiusmod \ntempor incididunt ut labore et dolore magna aliqua.',
493
+ * 'test',
494
+ * 'foo']], 4],
495
+ * b: new Map([['za', 1], ['zb', 'test']]),
496
+ * };
497
+ * console.log(inspect(o, { compact: true, depth: 5, breakLength: 80 }));
498
+ *
499
+ * // { a:
500
+ * // [ 1,
501
+ * // 2,
502
+ * // [ [ 'Lorem ipsum dolor sit amet,\nconsectetur [...]', // A long line
503
+ * // 'test',
504
+ * // 'foo' ] ],
505
+ * // 4 ],
506
+ * // b: Map(2) { 'za' => 1, 'zb' => 'test' } }
507
+ *
508
+ * // Setting `compact` to false or an integer creates more reader friendly output.
509
+ * console.log(inspect(o, { compact: false, depth: 5, breakLength: 80 }));
510
+ *
511
+ * // {
512
+ * // a: [
513
+ * // 1,
514
+ * // 2,
515
+ * // [
516
+ * // [
517
+ * // 'Lorem ipsum dolor sit amet,\n' +
518
+ * // 'consectetur adipiscing elit, sed do eiusmod \n' +
519
+ * // 'tempor incididunt ut labore et dolore magna aliqua.',
520
+ * // 'test',
521
+ * // 'foo'
522
+ * // ]
523
+ * // ],
524
+ * // 4
525
+ * // ],
526
+ * // b: Map(2) {
527
+ * // 'za' => 1,
528
+ * // 'zb' => 'test'
529
+ * // }
530
+ * // }
531
+ *
532
+ * // Setting `breakLength` to e.g. 150 will print the "Lorem ipsum" text in a
533
+ * // single line.
534
+ * ```
535
+ *
536
+ * The `showHidden` option allows `WeakMap` and `WeakSet` entries to be
537
+ * inspected. If there are more entries than `maxArrayLength`, there is no
538
+ * guarantee which entries are displayed. That means retrieving the same
539
+ * `WeakSet` entries twice may result in different output. Furthermore, entries
540
+ * with no remaining strong references may be garbage collected at any time.
541
+ *
542
+ * ```js
543
+ * import { inspect } from 'node:util';
544
+ *
545
+ * const obj = { a: 1 };
546
+ * const obj2 = { b: 2 };
547
+ * const weakSet = new WeakSet([obj, obj2]);
548
+ *
549
+ * console.log(inspect(weakSet, { showHidden: true }));
550
+ * // WeakSet { { a: 1 }, { b: 2 } }
551
+ * ```
552
+ *
553
+ * The `sorted` option ensures that an object's property insertion order does not
554
+ * impact the result of `util.inspect()`.
555
+ *
556
+ * ```js
557
+ * import { inspect } from 'node:util';
558
+ * import assert from 'node:assert';
559
+ *
560
+ * const o1 = {
561
+ * b: [2, 3, 1],
562
+ * a: '`a` comes before `b`',
563
+ * c: new Set([2, 3, 1]),
564
+ * };
565
+ * console.log(inspect(o1, { sorted: true }));
566
+ * // { a: '`a` comes before `b`', b: [ 2, 3, 1 ], c: Set(3) { 1, 2, 3 } }
567
+ * console.log(inspect(o1, { sorted: (a, b) => b.localeCompare(a) }));
568
+ * // { c: Set(3) { 3, 2, 1 }, b: [ 2, 3, 1 ], a: '`a` comes before `b`' }
569
+ *
570
+ * const o2 = {
571
+ * c: new Set([2, 1, 3]),
572
+ * a: '`a` comes before `b`',
573
+ * b: [2, 3, 1],
574
+ * };
575
+ * assert.strict.equal(
576
+ * inspect(o1, { sorted: true }),
577
+ * inspect(o2, { sorted: true }),
578
+ * );
579
+ * ```
580
+ *
581
+ * The `numericSeparator` option adds an underscore every three digits to all
582
+ * numbers.
583
+ *
584
+ * ```js
585
+ * import { inspect } from 'node:util';
586
+ *
587
+ * const thousand = 1000;
588
+ * const million = 1000000;
589
+ * const bigNumber = 123456789n;
590
+ * const bigDecimal = 1234.12345;
591
+ *
592
+ * console.log(inspect(thousand, { numericSeparator: true }));
593
+ * // 1_000
594
+ * console.log(inspect(million, { numericSeparator: true }));
595
+ * // 1_000_000
596
+ * console.log(inspect(bigNumber, { numericSeparator: true }));
597
+ * // 123_456_789n
598
+ * console.log(inspect(bigDecimal, { numericSeparator: true }));
599
+ * // 1_234.123_45
600
+ * ```
601
+ *
602
+ * `util.inspect()` is a synchronous method intended for debugging. Its maximum
603
+ * output length is approximately 128 MiB. Inputs that result in longer output will
604
+ * be truncated.
605
+ * @since v0.3.0
606
+ * @param object Any JavaScript primitive or `Object`.
607
+ * @return The representation of `object`.
608
+ */
609
+ export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
610
+ export function inspect(object: any, options?: InspectOptions): string;
611
+ export namespace inspect {
612
+ let colors: NodeJS.Dict<[number, number]>;
613
+ let styles: {
614
+ [K in Style]: string;
615
+ };
616
+ let defaultOptions: InspectOptions;
617
+ /**
618
+ * Allows changing inspect settings from the repl.
619
+ */
620
+ let replDefaults: InspectOptions;
621
+ /**
622
+ * That can be used to declare custom inspect functions.
623
+ */
624
+ const custom: unique symbol;
625
+ }
626
+ /**
627
+ * Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray).
628
+ *
629
+ * Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`.
630
+ *
631
+ * ```js
632
+ * import util from 'node:util';
633
+ *
634
+ * util.isArray([]);
635
+ * // Returns: true
636
+ * util.isArray(new Array());
637
+ * // Returns: true
638
+ * util.isArray({});
639
+ * // Returns: false
640
+ * ```
641
+ * @since v0.6.0
642
+ * @deprecated Since v4.0.0 - Use `isArray` instead.
643
+ */
644
+ export function isArray(object: unknown): object is unknown[];
645
+ /**
646
+ * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and
647
+ * `extends` keywords to get language level inheritance support. Also note
648
+ * that the two styles are [semantically incompatible](https://github.com/nodejs/node/issues/4179).
649
+ *
650
+ * Inherit the prototype methods from one
651
+ * [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The
652
+ * prototype of `constructor` will be set to a new object created from
653
+ * `superConstructor`.
654
+ *
655
+ * This mainly adds some input validation on top of
656
+ * `Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`.
657
+ * As an additional convenience, `superConstructor` will be accessible
658
+ * through the `constructor.super_` property.
659
+ *
660
+ * ```js
661
+ * const util = require('node:util');
662
+ * const EventEmitter = require('node:events');
663
+ *
664
+ * function MyStream() {
665
+ * EventEmitter.call(this);
666
+ * }
667
+ *
668
+ * util.inherits(MyStream, EventEmitter);
669
+ *
670
+ * MyStream.prototype.write = function(data) {
671
+ * this.emit('data', data);
672
+ * };
673
+ *
674
+ * const stream = new MyStream();
675
+ *
676
+ * console.log(stream instanceof EventEmitter); // true
677
+ * console.log(MyStream.super_ === EventEmitter); // true
678
+ *
679
+ * stream.on('data', (data) => {
680
+ * console.log(`Received data: "${data}"`);
681
+ * });
682
+ * stream.write('It works!'); // Received data: "It works!"
683
+ * ```
684
+ *
685
+ * ES6 example using `class` and `extends`:
686
+ *
687
+ * ```js
688
+ * import EventEmitter from 'node:events';
689
+ *
690
+ * class MyStream extends EventEmitter {
691
+ * write(data) {
692
+ * this.emit('data', data);
693
+ * }
694
+ * }
695
+ *
696
+ * const stream = new MyStream();
697
+ *
698
+ * stream.on('data', (data) => {
699
+ * console.log(`Received data: "${data}"`);
700
+ * });
701
+ * stream.write('With ES6');
702
+ * ```
703
+ * @since v0.3.0
704
+ * @legacy Use ES2015 class syntax and `extends` keyword instead.
705
+ */
706
+ export function inherits(constructor: unknown, superConstructor: unknown): void;
707
+ export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void;
708
+ export interface DebugLogger extends DebugLoggerFunction {
709
+ /**
710
+ * The `util.debuglog().enabled` getter is used to create a test that can be used
711
+ * in conditionals based on the existence of the `NODE_DEBUG` environment variable.
712
+ * If the `section` name appears within the value of that environment variable,
713
+ * then the returned value will be `true`. If not, then the returned value will be
714
+ * `false`.
715
+ *
716
+ * ```js
717
+ * import { debuglog } from 'node:util';
718
+ * const enabled = debuglog('foo').enabled;
719
+ * if (enabled) {
720
+ * console.log('hello from foo [%d]', 123);
721
+ * }
722
+ * ```
723
+ *
724
+ * If this program is run with `NODE_DEBUG=foo` in the environment, then it will
725
+ * output something like:
726
+ *
727
+ * ```console
728
+ * hello from foo [123]
729
+ * ```
730
+ */
731
+ enabled: boolean;
732
+ }
733
+ /**
734
+ * The `util.debuglog()` method is used to create a function that conditionally
735
+ * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG`
736
+ * environment variable. If the `section` name appears within the value of that
737
+ * environment variable, then the returned function operates similar to
738
+ * `console.error()`. If not, then the returned function is a no-op.
739
+ *
740
+ * ```js
741
+ * import { debuglog } from 'node:util';
742
+ * const log = debuglog('foo');
743
+ *
744
+ * log('hello from foo [%d]', 123);
745
+ * ```
746
+ *
747
+ * If this program is run with `NODE_DEBUG=foo` in the environment, then
748
+ * it will output something like:
749
+ *
750
+ * ```console
751
+ * FOO 3245: hello from foo [123]
752
+ * ```
753
+ *
754
+ * where `3245` is the process id. If it is not run with that
755
+ * environment variable set, then it will not print anything.
756
+ *
757
+ * The `section` supports wildcard also:
758
+ *
759
+ * ```js
760
+ * import { debuglog } from 'node:util';
761
+ * const log = debuglog('foo');
762
+ *
763
+ * log('hi there, it\'s foo-bar [%d]', 2333);
764
+ * ```
765
+ *
766
+ * if it is run with `NODE_DEBUG=foo*` in the environment, then it will output
767
+ * something like:
768
+ *
769
+ * ```console
770
+ * FOO-BAR 3257: hi there, it's foo-bar [2333]
771
+ * ```
772
+ *
773
+ * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG`
774
+ * environment variable: `NODE_DEBUG=fs,net,tls`.
775
+ *
776
+ * The optional `callback` argument can be used to replace the logging function
777
+ * with a different function that doesn't have any initialization or
778
+ * unnecessary wrapping.
779
+ *
780
+ * ```js
781
+ * import { debuglog } from 'node:util';
782
+ * let log = debuglog('internals', (debug) => {
783
+ * // Replace with a logging function that optimizes out
784
+ * // testing if the section is enabled
785
+ * log = debug;
786
+ * });
787
+ * ```
788
+ * @since v0.11.3
789
+ * @param section A string identifying the portion of the application for which the `debuglog` function is being created.
790
+ * @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function.
791
+ * @return The logging function
792
+ */
793
+ export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger;
794
+ export { debuglog as debug };
795
+ /**
796
+ * The `util.deprecate()` method wraps `fn` (which may be a function or class) in
797
+ * such a way that it is marked as deprecated.
798
+ *
799
+ * ```js
800
+ * import { deprecate } from 'node:util';
801
+ *
802
+ * export const obsoleteFunction = deprecate(() => {
803
+ * // Do something here.
804
+ * }, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.');
805
+ * ```
806
+ *
807
+ * When called, `util.deprecate()` will return a function that will emit a
808
+ * `DeprecationWarning` using the `'warning'` event. The warning will
809
+ * be emitted and printed to `stderr` the first time the returned function is
810
+ * called. After the warning is emitted, the wrapped function is called without
811
+ * emitting a warning.
812
+ *
813
+ * If the same optional `code` is supplied in multiple calls to `util.deprecate()`,
814
+ * the warning will be emitted only once for that `code`.
815
+ *
816
+ * ```js
817
+ * import { deprecate } from 'node:util';
818
+ *
819
+ * const fn1 = deprecate(
820
+ * () => 'a value',
821
+ * 'deprecation message',
822
+ * 'DEP0001',
823
+ * );
824
+ * const fn2 = deprecate(
825
+ * () => 'a different value',
826
+ * 'other dep message',
827
+ * 'DEP0001',
828
+ * );
829
+ * fn1(); // Emits a deprecation warning with code DEP0001
830
+ * fn2(); // Does not emit a deprecation warning because it has the same code
831
+ * ```
832
+ *
833
+ * If either the `--no-deprecation` or `--no-warnings` command-line flags are
834
+ * used, or if the `process.noDeprecation` property is set to `true` _prior_ to
835
+ * the first deprecation warning, the `util.deprecate()` method does nothing.
836
+ *
837
+ * If the `--trace-deprecation` or `--trace-warnings` command-line flags are set,
838
+ * or the `process.traceDeprecation` property is set to `true`, a warning and a
839
+ * stack trace are printed to `stderr` the first time the deprecated function is
840
+ * called.
841
+ *
842
+ * If the `--throw-deprecation` command-line flag is set, or the
843
+ * `process.throwDeprecation` property is set to `true`, then an exception will be
844
+ * thrown when the deprecated function is called.
845
+ *
846
+ * The `--throw-deprecation` command-line flag and `process.throwDeprecation`
847
+ * property take precedence over `--trace-deprecation` and
848
+ * `process.traceDeprecation`.
849
+ * @since v0.8.0
850
+ * @param fn The function that is being deprecated.
851
+ * @param msg A warning message to display when the deprecated function is invoked.
852
+ * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes.
853
+ * @return The deprecated function wrapped to emit a warning.
854
+ */
855
+ export function deprecate<T extends Function>(fn: T, msg: string, code?: string): T;
856
+ export interface IsDeepStrictEqualOptions {
857
+ /**
858
+ * If `true`, prototype and constructor
859
+ * comparison is skipped during deep strict equality check.
860
+ * @since v24.9.0
861
+ * @default false
862
+ */
863
+ skipPrototype?: boolean | undefined;
864
+ }
865
+ /**
866
+ * Returns `true` if there is deep strict equality between `val1` and `val2`.
867
+ * Otherwise, returns `false`.
868
+ *
869
+ * See `assert.deepStrictEqual()` for more information about deep strict
870
+ * equality.
871
+ * @since v9.0.0
872
+ */
873
+ export function isDeepStrictEqual(val1: unknown, val2: unknown, options?: IsDeepStrictEqualOptions): boolean;
874
+ /**
875
+ * Returns `str` with any ANSI escape codes removed.
876
+ *
877
+ * ```js
878
+ * console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m'));
879
+ * // Prints "value"
880
+ * ```
881
+ * @since v16.11.0
882
+ */
883
+ export function stripVTControlCharacters(str: string): string;
884
+ /**
885
+ * Takes an `async` function (or a function that returns a `Promise`) and returns a
886
+ * function following the error-first callback style, i.e. taking
887
+ * an `(err, value) => ...` callback as the last argument. In the callback, the
888
+ * first argument will be the rejection reason (or `null` if the `Promise`
889
+ * resolved), and the second argument will be the resolved value.
890
+ *
891
+ * ```js
892
+ * import { callbackify } from 'node:util';
893
+ *
894
+ * async function fn() {
895
+ * return 'hello world';
896
+ * }
897
+ * const callbackFunction = callbackify(fn);
898
+ *
899
+ * callbackFunction((err, ret) => {
900
+ * if (err) throw err;
901
+ * console.log(ret);
902
+ * });
903
+ * ```
904
+ *
905
+ * Will print:
906
+ *
907
+ * ```text
908
+ * hello world
909
+ * ```
910
+ *
911
+ * The callback is executed asynchronously, and will have a limited stack trace.
912
+ * If the callback throws, the process will emit an `'uncaughtException'`
913
+ * event, and if not handled will exit.
914
+ *
915
+ * Since `null` has a special meaning as the first argument to a callback, if a
916
+ * wrapped function rejects a `Promise` with a falsy value as a reason, the value
917
+ * is wrapped in an `Error` with the original value stored in a field named
918
+ * `reason`.
919
+ *
920
+ * ```js
921
+ * function fn() {
922
+ * return Promise.reject(null);
923
+ * }
924
+ * const callbackFunction = util.callbackify(fn);
925
+ *
926
+ * callbackFunction((err, ret) => {
927
+ * // When the Promise was rejected with `null` it is wrapped with an Error and
928
+ * // the original value is stored in `reason`.
929
+ * err && Object.hasOwn(err, 'reason') && err.reason === null; // true
930
+ * });
931
+ * ```
932
+ * @since v8.2.0
933
+ * @param fn An `async` function
934
+ * @return a callback style function
935
+ */
936
+ export function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
937
+ export function callbackify<TResult>(
938
+ fn: () => Promise<TResult>,
939
+ ): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
940
+ export function callbackify<T1>(
941
+ fn: (arg1: T1) => Promise<void>,
942
+ ): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
943
+ export function callbackify<T1, TResult>(
944
+ fn: (arg1: T1) => Promise<TResult>,
945
+ ): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
946
+ export function callbackify<T1, T2>(
947
+ fn: (arg1: T1, arg2: T2) => Promise<void>,
948
+ ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
949
+ export function callbackify<T1, T2, TResult>(
950
+ fn: (arg1: T1, arg2: T2) => Promise<TResult>,
951
+ ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
952
+ export function callbackify<T1, T2, T3>(
953
+ fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>,
954
+ ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
955
+ export function callbackify<T1, T2, T3, TResult>(
956
+ fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>,
957
+ ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
958
+ export function callbackify<T1, T2, T3, T4>(
959
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>,
960
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
961
+ export function callbackify<T1, T2, T3, T4, TResult>(
962
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>,
963
+ ): (
964
+ arg1: T1,
965
+ arg2: T2,
966
+ arg3: T3,
967
+ arg4: T4,
968
+ callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
969
+ ) => void;
970
+ export function callbackify<T1, T2, T3, T4, T5>(
971
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>,
972
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
973
+ export function callbackify<T1, T2, T3, T4, T5, TResult>(
974
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>,
975
+ ): (
976
+ arg1: T1,
977
+ arg2: T2,
978
+ arg3: T3,
979
+ arg4: T4,
980
+ arg5: T5,
981
+ callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
982
+ ) => void;
983
+ export function callbackify<T1, T2, T3, T4, T5, T6>(
984
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>,
985
+ ): (
986
+ arg1: T1,
987
+ arg2: T2,
988
+ arg3: T3,
989
+ arg4: T4,
990
+ arg5: T5,
991
+ arg6: T6,
992
+ callback: (err: NodeJS.ErrnoException) => void,
993
+ ) => void;
994
+ export function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
995
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>,
996
+ ): (
997
+ arg1: T1,
998
+ arg2: T2,
999
+ arg3: T3,
1000
+ arg4: T4,
1001
+ arg5: T5,
1002
+ arg6: T6,
1003
+ callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
1004
+ ) => void;
1005
+ export interface CustomPromisifyLegacy<TCustom extends Function> extends Function {
1006
+ __promisify__: TCustom;
1007
+ }
1008
+ export interface CustomPromisifySymbol<TCustom extends Function> extends Function {
1009
+ [promisify.custom]: TCustom;
1010
+ }
1011
+ export type CustomPromisify<TCustom extends Function> =
1012
+ | CustomPromisifySymbol<TCustom>
1013
+ | CustomPromisifyLegacy<TCustom>;
1014
+ /**
1015
+ * Takes a function following the common error-first callback style, i.e. taking
1016
+ * an `(err, value) => ...` callback as the last argument, and returns a version
1017
+ * that returns promises.
1018
+ *
1019
+ * ```js
1020
+ * import { promisify } from 'node:util';
1021
+ * import { stat } from 'node:fs';
1022
+ *
1023
+ * const promisifiedStat = promisify(stat);
1024
+ * promisifiedStat('.').then((stats) => {
1025
+ * // Do something with `stats`
1026
+ * }).catch((error) => {
1027
+ * // Handle the error.
1028
+ * });
1029
+ * ```
1030
+ *
1031
+ * Or, equivalently using `async function`s:
1032
+ *
1033
+ * ```js
1034
+ * import { promisify } from 'node:util';
1035
+ * import { stat } from 'node:fs';
1036
+ *
1037
+ * const promisifiedStat = promisify(stat);
1038
+ *
1039
+ * async function callStat() {
1040
+ * const stats = await promisifiedStat('.');
1041
+ * console.log(`This directory is owned by ${stats.uid}`);
1042
+ * }
1043
+ *
1044
+ * callStat();
1045
+ * ```
1046
+ *
1047
+ * If there is an `original[util.promisify.custom]` property present, `promisify`
1048
+ * will return its value, see [Custom promisified functions](https://nodejs.org/docs/latest-v24.x/api/util.html#custom-promisified-functions).
1049
+ *
1050
+ * `promisify()` assumes that `original` is a function taking a callback as its
1051
+ * final argument in all cases. If `original` is not a function, `promisify()`
1052
+ * will throw an error. If `original` is a function but its last argument is not
1053
+ * an error-first callback, it will still be passed an error-first
1054
+ * callback as its last argument.
1055
+ *
1056
+ * Using `promisify()` on class methods or other methods that use `this` may not
1057
+ * work as expected unless handled specially:
1058
+ *
1059
+ * ```js
1060
+ * import { promisify } from 'node:util';
1061
+ *
1062
+ * class Foo {
1063
+ * constructor() {
1064
+ * this.a = 42;
1065
+ * }
1066
+ *
1067
+ * bar(callback) {
1068
+ * callback(null, this.a);
1069
+ * }
1070
+ * }
1071
+ *
1072
+ * const foo = new Foo();
1073
+ *
1074
+ * const naiveBar = promisify(foo.bar);
1075
+ * // TypeError: Cannot read properties of undefined (reading 'a')
1076
+ * // naiveBar().then(a => console.log(a));
1077
+ *
1078
+ * naiveBar.call(foo).then((a) => console.log(a)); // '42'
1079
+ *
1080
+ * const bindBar = naiveBar.bind(foo);
1081
+ * bindBar().then((a) => console.log(a)); // '42'
1082
+ * ```
1083
+ * @since v8.0.0
1084
+ */
1085
+ export function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
1086
+ export function promisify<TResult>(
1087
+ fn: (callback: (err: any, result: TResult) => void) => void,
1088
+ ): () => Promise<TResult>;
1089
+ export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
1090
+ export function promisify<T1, TResult>(
1091
+ fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void,
1092
+ ): (arg1: T1) => Promise<TResult>;
1093
+ export function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
1094
+ export function promisify<T1, T2, TResult>(
1095
+ fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void,
1096
+ ): (arg1: T1, arg2: T2) => Promise<TResult>;
1097
+ export function promisify<T1, T2>(
1098
+ fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void,
1099
+ ): (arg1: T1, arg2: T2) => Promise<void>;
1100
+ export function promisify<T1, T2, T3, TResult>(
1101
+ fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void,
1102
+ ): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
1103
+ export function promisify<T1, T2, T3>(
1104
+ fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void,
1105
+ ): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
1106
+ export function promisify<T1, T2, T3, T4, TResult>(
1107
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void,
1108
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
1109
+ export function promisify<T1, T2, T3, T4>(
1110
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void,
1111
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
1112
+ export function promisify<T1, T2, T3, T4, T5, TResult>(
1113
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void,
1114
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
1115
+ export function promisify<T1, T2, T3, T4, T5>(
1116
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void,
1117
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
1118
+ export function promisify(fn: Function): Function;
1119
+ export namespace promisify {
1120
+ /**
1121
+ * That can be used to declare custom promisified variants of functions.
1122
+ */
1123
+ const custom: unique symbol;
1124
+ }
1125
+ /**
1126
+ * Stability: 1.1 - Active development
1127
+ * Given an example `.env` file:
1128
+ *
1129
+ * ```js
1130
+ * import { parseEnv } from 'node:util';
1131
+ *
1132
+ * parseEnv('HELLO=world\nHELLO=oh my\n');
1133
+ * // Returns: { HELLO: 'oh my' }
1134
+ * ```
1135
+ * @param content The raw contents of a `.env` file.
1136
+ * @since v20.12.0
1137
+ */
1138
+ export function parseEnv(content: string): NodeJS.Dict<string>;
1139
+ // https://nodejs.org/docs/latest/api/util.html#foreground-colors
1140
+ type ForegroundColors =
1141
+ | "black"
1142
+ | "blackBright"
1143
+ | "blue"
1144
+ | "blueBright"
1145
+ | "cyan"
1146
+ | "cyanBright"
1147
+ | "gray"
1148
+ | "green"
1149
+ | "greenBright"
1150
+ | "grey"
1151
+ | "magenta"
1152
+ | "magentaBright"
1153
+ | "red"
1154
+ | "redBright"
1155
+ | "white"
1156
+ | "whiteBright"
1157
+ | "yellow"
1158
+ | "yellowBright";
1159
+ // https://nodejs.org/docs/latest/api/util.html#background-colors
1160
+ type BackgroundColors =
1161
+ | "bgBlack"
1162
+ | "bgBlackBright"
1163
+ | "bgBlue"
1164
+ | "bgBlueBright"
1165
+ | "bgCyan"
1166
+ | "bgCyanBright"
1167
+ | "bgGray"
1168
+ | "bgGreen"
1169
+ | "bgGreenBright"
1170
+ | "bgGrey"
1171
+ | "bgMagenta"
1172
+ | "bgMagentaBright"
1173
+ | "bgRed"
1174
+ | "bgRedBright"
1175
+ | "bgWhite"
1176
+ | "bgWhiteBright"
1177
+ | "bgYellow"
1178
+ | "bgYellowBright";
1179
+ // https://nodejs.org/docs/latest/api/util.html#modifiers
1180
+ type Modifiers =
1181
+ | "blink"
1182
+ | "bold"
1183
+ | "dim"
1184
+ | "doubleunderline"
1185
+ | "framed"
1186
+ | "hidden"
1187
+ | "inverse"
1188
+ | "italic"
1189
+ | "none"
1190
+ | "overlined"
1191
+ | "reset"
1192
+ | "strikethrough"
1193
+ | "underline";
1194
+ export interface StyleTextOptions {
1195
+ /**
1196
+ * When true, `stream` is checked to see if it can handle colors.
1197
+ * @default true
1198
+ */
1199
+ validateStream?: boolean | undefined;
1200
+ /**
1201
+ * A stream that will be validated if it can be colored.
1202
+ * @default process.stdout
1203
+ */
1204
+ stream?: NodeJS.WritableStream | undefined;
1205
+ }
1206
+ /**
1207
+ * This function returns a formatted text considering the `format` passed
1208
+ * for printing in a terminal. It is aware of the terminal's capabilities
1209
+ * and acts according to the configuration set via `NO_COLOR`,
1210
+ * `NODE_DISABLE_COLORS` and `FORCE_COLOR` environment variables.
1211
+ *
1212
+ * ```js
1213
+ * import { styleText } from 'node:util';
1214
+ * import { stderr } from 'node:process';
1215
+ *
1216
+ * const successMessage = styleText('green', 'Success!');
1217
+ * console.log(successMessage);
1218
+ *
1219
+ * const errorMessage = styleText(
1220
+ * 'red',
1221
+ * 'Error! Error!',
1222
+ * // Validate if process.stderr has TTY
1223
+ * { stream: stderr },
1224
+ * );
1225
+ * console.error(errorMessage);
1226
+ * ```
1227
+ *
1228
+ * `util.inspect.colors` also provides text formats such as `italic`, and
1229
+ * `underline` and you can combine both:
1230
+ *
1231
+ * ```js
1232
+ * console.log(
1233
+ * util.styleText(['underline', 'italic'], 'My italic underlined message'),
1234
+ * );
1235
+ * ```
1236
+ *
1237
+ * When passing an array of formats, the order of the format applied
1238
+ * is left to right so the following style might overwrite the previous one.
1239
+ *
1240
+ * ```js
1241
+ * console.log(
1242
+ * util.styleText(['red', 'green'], 'text'), // green
1243
+ * );
1244
+ * ```
1245
+ *
1246
+ * The special format value `none` applies no additional styling to the text.
1247
+ *
1248
+ * The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v24.x/api/util.html#modifiers).
1249
+ * @param format A text format or an Array of text formats defined in `util.inspect.colors`.
1250
+ * @param text The text to to be formatted.
1251
+ * @since v20.12.0
1252
+ */
1253
+ export function styleText(
1254
+ format:
1255
+ | ForegroundColors
1256
+ | BackgroundColors
1257
+ | Modifiers
1258
+ | Array<ForegroundColors | BackgroundColors | Modifiers>,
1259
+ text: string,
1260
+ options?: StyleTextOptions,
1261
+ ): string;
1262
+ /**
1263
+ * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextDecoder` API.
1264
+ *
1265
+ * ```js
1266
+ * const decoder = new TextDecoder();
1267
+ * const u8arr = new Uint8Array([72, 101, 108, 108, 111]);
1268
+ * console.log(decoder.decode(u8arr)); // Hello
1269
+ * ```
1270
+ * @since v8.3.0
1271
+ */
1272
+ export class TextDecoder {
1273
+ /**
1274
+ * The encoding supported by the `TextDecoder` instance.
1275
+ */
1276
+ readonly encoding: string;
1277
+ /**
1278
+ * The value will be `true` if decoding errors result in a `TypeError` being
1279
+ * thrown.
1280
+ */
1281
+ readonly fatal: boolean;
1282
+ /**
1283
+ * The value will be `true` if the decoding result will include the byte order
1284
+ * mark.
1285
+ */
1286
+ readonly ignoreBOM: boolean;
1287
+ constructor(
1288
+ encoding?: string,
1289
+ options?: {
1290
+ fatal?: boolean | undefined;
1291
+ ignoreBOM?: boolean | undefined;
1292
+ },
1293
+ );
1294
+ /**
1295
+ * Decodes the `input` and returns a string. If `options.stream` is `true`, any
1296
+ * incomplete byte sequences occurring at the end of the `input` are buffered
1297
+ * internally and emitted after the next call to `textDecoder.decode()`.
1298
+ *
1299
+ * If `textDecoder.fatal` is `true`, decoding errors that occur will result in a `TypeError` being thrown.
1300
+ * @param input An `ArrayBuffer`, `DataView`, or `TypedArray` instance containing the encoded data.
1301
+ */
1302
+ decode(
1303
+ input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
1304
+ options?: {
1305
+ stream?: boolean | undefined;
1306
+ },
1307
+ ): string;
1308
+ }
1309
+ export interface EncodeIntoResult {
1310
+ /**
1311
+ * The read Unicode code units of input.
1312
+ */
1313
+ read: number;
1314
+ /**
1315
+ * The written UTF-8 bytes of output.
1316
+ */
1317
+ written: number;
1318
+ }
1319
+ export { types };
1320
+
1321
+ //// TextEncoder/Decoder
1322
+ /**
1323
+ * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextEncoder` API. All
1324
+ * instances of `TextEncoder` only support UTF-8 encoding.
1325
+ *
1326
+ * ```js
1327
+ * const encoder = new TextEncoder();
1328
+ * const uint8array = encoder.encode('this is some data');
1329
+ * ```
1330
+ *
1331
+ * The `TextEncoder` class is also available on the global object.
1332
+ * @since v8.3.0
1333
+ */
1334
+ export class TextEncoder {
1335
+ /**
1336
+ * The encoding supported by the `TextEncoder` instance. Always set to `'utf-8'`.
1337
+ */
1338
+ readonly encoding: string;
1339
+ /**
1340
+ * UTF-8 encodes the `input` string and returns a `Uint8Array` containing the
1341
+ * encoded bytes.
1342
+ * @param [input='an empty string'] The text to encode.
1343
+ */
1344
+ encode(input?: string): NodeJS.NonSharedUint8Array;
1345
+ /**
1346
+ * UTF-8 encodes the `src` string to the `dest` Uint8Array and returns an object
1347
+ * containing the read Unicode code units and written UTF-8 bytes.
1348
+ *
1349
+ * ```js
1350
+ * const encoder = new TextEncoder();
1351
+ * const src = 'this is some data';
1352
+ * const dest = new Uint8Array(10);
1353
+ * const { read, written } = encoder.encodeInto(src, dest);
1354
+ * ```
1355
+ * @param src The text to encode.
1356
+ * @param dest The array to hold the encode result.
1357
+ */
1358
+ encodeInto(src: string, dest: Uint8Array): EncodeIntoResult;
1359
+ }
1360
+ import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from "util";
1361
+ global {
1362
+ /**
1363
+ * `TextDecoder` class is a global reference for `import { TextDecoder } from 'node:util'`
1364
+ * https://nodejs.org/api/globals.html#textdecoder
1365
+ * @since v11.0.0
1366
+ */
1367
+ var TextDecoder: typeof globalThis extends {
1368
+ onmessage: any;
1369
+ TextDecoder: infer TextDecoder;
1370
+ } ? TextDecoder
1371
+ : typeof _TextDecoder;
1372
+ /**
1373
+ * `TextEncoder` class is a global reference for `import { TextEncoder } from 'node:util'`
1374
+ * https://nodejs.org/api/globals.html#textencoder
1375
+ * @since v11.0.0
1376
+ */
1377
+ var TextEncoder: typeof globalThis extends {
1378
+ onmessage: any;
1379
+ TextEncoder: infer TextEncoder;
1380
+ } ? TextEncoder
1381
+ : typeof _TextEncoder;
1382
+ }
1383
+
1384
+ //// parseArgs
1385
+ /**
1386
+ * Provides a higher level API for command-line argument parsing than interacting
1387
+ * with `process.argv` directly. Takes a specification for the expected arguments
1388
+ * and returns a structured object with the parsed options and positionals.
1389
+ *
1390
+ * ```js
1391
+ * import { parseArgs } from 'node:util';
1392
+ * const args = ['-f', '--bar', 'b'];
1393
+ * const options = {
1394
+ * foo: {
1395
+ * type: 'boolean',
1396
+ * short: 'f',
1397
+ * },
1398
+ * bar: {
1399
+ * type: 'string',
1400
+ * },
1401
+ * };
1402
+ * const {
1403
+ * values,
1404
+ * positionals,
1405
+ * } = parseArgs({ args, options });
1406
+ * console.log(values, positionals);
1407
+ * // Prints: [Object: null prototype] { foo: true, bar: 'b' } []
1408
+ * ```
1409
+ * @since v18.3.0, v16.17.0
1410
+ * @param config Used to provide arguments for parsing and to configure the parser. `config` supports the following properties:
1411
+ * @return The parsed command line arguments:
1412
+ */
1413
+ export function parseArgs<T extends ParseArgsConfig>(config?: T): ParsedResults<T>;
1414
+
1415
+ /**
1416
+ * Type of argument used in {@link parseArgs}.
1417
+ */
1418
+ export type ParseArgsOptionsType = "boolean" | "string";
1419
+
1420
+ export interface ParseArgsOptionDescriptor {
1421
+ /**
1422
+ * Type of argument.
1423
+ */
1424
+ type: ParseArgsOptionsType;
1425
+ /**
1426
+ * Whether this option can be provided multiple times.
1427
+ * If `true`, all values will be collected in an array.
1428
+ * If `false`, values for the option are last-wins.
1429
+ * @default false.
1430
+ */
1431
+ multiple?: boolean | undefined;
1432
+ /**
1433
+ * A single character alias for the option.
1434
+ */
1435
+ short?: string | undefined;
1436
+ /**
1437
+ * The value to assign to
1438
+ * the option if it does not appear in the arguments to be parsed. The value
1439
+ * must match the type specified by the `type` property. If `multiple` is
1440
+ * `true`, it must be an array. No default value is applied when the option
1441
+ * does appear in the arguments to be parsed, even if the provided value
1442
+ * is falsy.
1443
+ * @since v18.11.0
1444
+ */
1445
+ default?: string | boolean | string[] | boolean[] | undefined;
1446
+ }
1447
+ export interface ParseArgsOptionsConfig {
1448
+ [longOption: string]: ParseArgsOptionDescriptor;
1449
+ }
1450
+ export interface ParseArgsConfig {
1451
+ /**
1452
+ * Array of argument strings.
1453
+ */
1454
+ args?: readonly string[] | undefined;
1455
+ /**
1456
+ * Used to describe arguments known to the parser.
1457
+ */
1458
+ options?: ParseArgsOptionsConfig | undefined;
1459
+ /**
1460
+ * Should an error be thrown when unknown arguments are encountered,
1461
+ * or when arguments are passed that do not match the `type` configured in `options`.
1462
+ * @default true
1463
+ */
1464
+ strict?: boolean | undefined;
1465
+ /**
1466
+ * Whether this command accepts positional arguments.
1467
+ */
1468
+ allowPositionals?: boolean | undefined;
1469
+ /**
1470
+ * If `true`, allows explicitly setting boolean options to `false` by prefixing the option name with `--no-`.
1471
+ * @default false
1472
+ * @since v22.4.0
1473
+ */
1474
+ allowNegative?: boolean | undefined;
1475
+ /**
1476
+ * Return the parsed tokens. This is useful for extending the built-in behavior,
1477
+ * from adding additional checks through to reprocessing the tokens in different ways.
1478
+ * @default false
1479
+ */
1480
+ tokens?: boolean | undefined;
1481
+ }
1482
+ /*
1483
+ IfDefaultsTrue and IfDefaultsFalse are helpers to handle default values for missing boolean properties.
1484
+ TypeScript does not have exact types for objects: https://github.com/microsoft/TypeScript/issues/12936
1485
+ This means it is impossible to distinguish between "field X is definitely not present" and "field X may or may not be present".
1486
+ But we expect users to generally provide their config inline or `as const`, which means TS will always know whether a given field is present.
1487
+ So this helper treats "not definitely present" (i.e., not `extends boolean`) as being "definitely not present", i.e. it should have its default value.
1488
+ This is technically incorrect but is a much nicer UX for the common case.
1489
+ The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false.
1490
+ */
1491
+ type IfDefaultsTrue<T, IfTrue, IfFalse> = T extends true ? IfTrue
1492
+ : T extends false ? IfFalse
1493
+ : IfTrue;
1494
+
1495
+ // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false`
1496
+ type IfDefaultsFalse<T, IfTrue, IfFalse> = T extends false ? IfFalse
1497
+ : T extends true ? IfTrue
1498
+ : IfFalse;
1499
+
1500
+ type ExtractOptionValue<T extends ParseArgsConfig, O extends ParseArgsOptionDescriptor> = IfDefaultsTrue<
1501
+ T["strict"],
1502
+ O["type"] extends "string" ? string : O["type"] extends "boolean" ? boolean : string | boolean,
1503
+ string | boolean
1504
+ >;
1505
+
1506
+ type ApplyOptionalModifiers<O extends ParseArgsOptionsConfig, V extends Record<keyof O, unknown>> = (
1507
+ & { -readonly [LongOption in keyof O]?: V[LongOption] }
1508
+ & { [LongOption in keyof O as O[LongOption]["default"] extends {} ? LongOption : never]: V[LongOption] }
1509
+ ) extends infer P ? { [K in keyof P]: P[K] } : never; // resolve intersection to object
1510
+
1511
+ type ParsedValues<T extends ParseArgsConfig> =
1512
+ & IfDefaultsTrue<T["strict"], unknown, { [longOption: string]: undefined | string | boolean }>
1513
+ & (T["options"] extends ParseArgsOptionsConfig ? ApplyOptionalModifiers<
1514
+ T["options"],
1515
+ {
1516
+ [LongOption in keyof T["options"]]: IfDefaultsFalse<
1517
+ T["options"][LongOption]["multiple"],
1518
+ Array<ExtractOptionValue<T, T["options"][LongOption]>>,
1519
+ ExtractOptionValue<T, T["options"][LongOption]>
1520
+ >;
1521
+ }
1522
+ >
1523
+ : {});
1524
+
1525
+ type ParsedPositionals<T extends ParseArgsConfig> = IfDefaultsTrue<
1526
+ T["strict"],
1527
+ IfDefaultsFalse<T["allowPositionals"], string[], []>,
1528
+ IfDefaultsTrue<T["allowPositionals"], string[], []>
1529
+ >;
1530
+
1531
+ type PreciseTokenForOptions<
1532
+ K extends string,
1533
+ O extends ParseArgsOptionDescriptor,
1534
+ > = O["type"] extends "string" ? {
1535
+ kind: "option";
1536
+ index: number;
1537
+ name: K;
1538
+ rawName: string;
1539
+ value: string;
1540
+ inlineValue: boolean;
1541
+ }
1542
+ : O["type"] extends "boolean" ? {
1543
+ kind: "option";
1544
+ index: number;
1545
+ name: K;
1546
+ rawName: string;
1547
+ value: undefined;
1548
+ inlineValue: undefined;
1549
+ }
1550
+ : OptionToken & { name: K };
1551
+
1552
+ type TokenForOptions<
1553
+ T extends ParseArgsConfig,
1554
+ K extends keyof T["options"] = keyof T["options"],
1555
+ > = K extends unknown
1556
+ ? T["options"] extends ParseArgsOptionsConfig ? PreciseTokenForOptions<K & string, T["options"][K]>
1557
+ : OptionToken
1558
+ : never;
1559
+
1560
+ type ParsedOptionToken<T extends ParseArgsConfig> = IfDefaultsTrue<T["strict"], TokenForOptions<T>, OptionToken>;
1561
+
1562
+ type ParsedPositionalToken<T extends ParseArgsConfig> = IfDefaultsTrue<
1563
+ T["strict"],
1564
+ IfDefaultsFalse<T["allowPositionals"], { kind: "positional"; index: number; value: string }, never>,
1565
+ IfDefaultsTrue<T["allowPositionals"], { kind: "positional"; index: number; value: string }, never>
1566
+ >;
1567
+
1568
+ type ParsedTokens<T extends ParseArgsConfig> = Array<
1569
+ ParsedOptionToken<T> | ParsedPositionalToken<T> | { kind: "option-terminator"; index: number }
1570
+ >;
1571
+
1572
+ type PreciseParsedResults<T extends ParseArgsConfig> = IfDefaultsFalse<
1573
+ T["tokens"],
1574
+ {
1575
+ values: ParsedValues<T>;
1576
+ positionals: ParsedPositionals<T>;
1577
+ tokens: ParsedTokens<T>;
1578
+ },
1579
+ {
1580
+ values: ParsedValues<T>;
1581
+ positionals: ParsedPositionals<T>;
1582
+ }
1583
+ >;
1584
+
1585
+ type OptionToken =
1586
+ | { kind: "option"; index: number; name: string; rawName: string; value: string; inlineValue: boolean }
1587
+ | {
1588
+ kind: "option";
1589
+ index: number;
1590
+ name: string;
1591
+ rawName: string;
1592
+ value: undefined;
1593
+ inlineValue: undefined;
1594
+ };
1595
+
1596
+ type Token =
1597
+ | OptionToken
1598
+ | { kind: "positional"; index: number; value: string }
1599
+ | { kind: "option-terminator"; index: number };
1600
+
1601
+ // If ParseArgsConfig extends T, then the user passed config constructed elsewhere.
1602
+ // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above.
1603
+ type ParsedResults<T extends ParseArgsConfig> = ParseArgsConfig extends T ? {
1604
+ values: {
1605
+ [longOption: string]: undefined | string | boolean | Array<string | boolean>;
1606
+ };
1607
+ positionals: string[];
1608
+ tokens?: Token[];
1609
+ }
1610
+ : PreciseParsedResults<T>;
1611
+
1612
+ /**
1613
+ * An implementation of [the MIMEType class](https://bmeck.github.io/node-proposal-mime-api/).
1614
+ *
1615
+ * In accordance with browser conventions, all properties of `MIMEType` objects
1616
+ * are implemented as getters and setters on the class prototype, rather than as
1617
+ * data properties on the object itself.
1618
+ *
1619
+ * A MIME string is a structured string containing multiple meaningful
1620
+ * components. When parsed, a `MIMEType` object is returned containing
1621
+ * properties for each of these components.
1622
+ * @since v19.1.0, v18.13.0
1623
+ */
1624
+ export class MIMEType {
1625
+ /**
1626
+ * Creates a new MIMEType object by parsing the input.
1627
+ *
1628
+ * A `TypeError` will be thrown if the `input` is not a valid MIME.
1629
+ * Note that an effort will be made to coerce the given values into strings.
1630
+ * @param input The input MIME to parse.
1631
+ */
1632
+ constructor(input: string | { toString: () => string });
1633
+
1634
+ /**
1635
+ * Gets and sets the type portion of the MIME.
1636
+ *
1637
+ * ```js
1638
+ * import { MIMEType } from 'node:util';
1639
+ *
1640
+ * const myMIME = new MIMEType('text/javascript');
1641
+ * console.log(myMIME.type);
1642
+ * // Prints: text
1643
+ * myMIME.type = 'application';
1644
+ * console.log(myMIME.type);
1645
+ * // Prints: application
1646
+ * console.log(String(myMIME));
1647
+ * // Prints: application/javascript
1648
+ * ```
1649
+ */
1650
+ type: string;
1651
+ /**
1652
+ * Gets and sets the subtype portion of the MIME.
1653
+ *
1654
+ * ```js
1655
+ * import { MIMEType } from 'node:util';
1656
+ *
1657
+ * const myMIME = new MIMEType('text/ecmascript');
1658
+ * console.log(myMIME.subtype);
1659
+ * // Prints: ecmascript
1660
+ * myMIME.subtype = 'javascript';
1661
+ * console.log(myMIME.subtype);
1662
+ * // Prints: javascript
1663
+ * console.log(String(myMIME));
1664
+ * // Prints: text/javascript
1665
+ * ```
1666
+ */
1667
+ subtype: string;
1668
+ /**
1669
+ * Gets the essence of the MIME. This property is read only.
1670
+ * Use `mime.type` or `mime.subtype` to alter the MIME.
1671
+ *
1672
+ * ```js
1673
+ * import { MIMEType } from 'node:util';
1674
+ *
1675
+ * const myMIME = new MIMEType('text/javascript;key=value');
1676
+ * console.log(myMIME.essence);
1677
+ * // Prints: text/javascript
1678
+ * myMIME.type = 'application';
1679
+ * console.log(myMIME.essence);
1680
+ * // Prints: application/javascript
1681
+ * console.log(String(myMIME));
1682
+ * // Prints: application/javascript;key=value
1683
+ * ```
1684
+ */
1685
+ readonly essence: string;
1686
+ /**
1687
+ * Gets the `MIMEParams` object representing the
1688
+ * parameters of the MIME. This property is read-only. See `MIMEParams` documentation for details.
1689
+ */
1690
+ readonly params: MIMEParams;
1691
+ /**
1692
+ * The `toString()` method on the `MIMEType` object returns the serialized MIME.
1693
+ *
1694
+ * Because of the need for standard compliance, this method does not allow users
1695
+ * to customize the serialization process of the MIME.
1696
+ */
1697
+ toString(): string;
1698
+ }
1699
+ /**
1700
+ * The `MIMEParams` API provides read and write access to the parameters of a `MIMEType`.
1701
+ * @since v19.1.0, v18.13.0
1702
+ */
1703
+ export class MIMEParams {
1704
+ /**
1705
+ * Remove all name-value pairs whose name is `name`.
1706
+ */
1707
+ delete(name: string): void;
1708
+ /**
1709
+ * Returns an iterator over each of the name-value pairs in the parameters.
1710
+ * Each item of the iterator is a JavaScript `Array`. The first item of the array
1711
+ * is the `name`, the second item of the array is the `value`.
1712
+ */
1713
+ entries(): NodeJS.Iterator<[name: string, value: string]>;
1714
+ /**
1715
+ * Returns the value of the first name-value pair whose name is `name`. If there
1716
+ * are no such pairs, `null` is returned.
1717
+ * @return or `null` if there is no name-value pair with the given `name`.
1718
+ */
1719
+ get(name: string): string | null;
1720
+ /**
1721
+ * Returns `true` if there is at least one name-value pair whose name is `name`.
1722
+ */
1723
+ has(name: string): boolean;
1724
+ /**
1725
+ * Returns an iterator over the names of each name-value pair.
1726
+ *
1727
+ * ```js
1728
+ * import { MIMEType } from 'node:util';
1729
+ *
1730
+ * const { params } = new MIMEType('text/plain;foo=0;bar=1');
1731
+ * for (const name of params.keys()) {
1732
+ * console.log(name);
1733
+ * }
1734
+ * // Prints:
1735
+ * // foo
1736
+ * // bar
1737
+ * ```
1738
+ */
1739
+ keys(): NodeJS.Iterator<string>;
1740
+ /**
1741
+ * Sets the value in the `MIMEParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`,
1742
+ * set the first such pair's value to `value`.
1743
+ *
1744
+ * ```js
1745
+ * import { MIMEType } from 'node:util';
1746
+ *
1747
+ * const { params } = new MIMEType('text/plain;foo=0;bar=1');
1748
+ * params.set('foo', 'def');
1749
+ * params.set('baz', 'xyz');
1750
+ * console.log(params.toString());
1751
+ * // Prints: foo=def;bar=1;baz=xyz
1752
+ * ```
1753
+ */
1754
+ set(name: string, value: string): void;
1755
+ /**
1756
+ * Returns an iterator over the values of each name-value pair.
1757
+ */
1758
+ values(): NodeJS.Iterator<string>;
1759
+ /**
1760
+ * Returns an iterator over each of the name-value pairs in the parameters.
1761
+ */
1762
+ [Symbol.iterator](): NodeJS.Iterator<[name: string, value: string]>;
1763
+ }
1764
+ }
1765
+ declare module "util/types" {
1766
+ import { KeyObject, webcrypto } from "node:crypto";
1767
+ /**
1768
+ * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or
1769
+ * [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance.
1770
+ *
1771
+ * See also `util.types.isArrayBuffer()` and `util.types.isSharedArrayBuffer()`.
1772
+ *
1773
+ * ```js
1774
+ * util.types.isAnyArrayBuffer(new ArrayBuffer()); // Returns true
1775
+ * util.types.isAnyArrayBuffer(new SharedArrayBuffer()); // Returns true
1776
+ * ```
1777
+ * @since v10.0.0
1778
+ */
1779
+ function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike;
1780
+ /**
1781
+ * Returns `true` if the value is an `arguments` object.
1782
+ *
1783
+ * ```js
1784
+ * function foo() {
1785
+ * util.types.isArgumentsObject(arguments); // Returns true
1786
+ * }
1787
+ * ```
1788
+ * @since v10.0.0
1789
+ */
1790
+ function isArgumentsObject(object: unknown): object is IArguments;
1791
+ /**
1792
+ * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instance.
1793
+ * This does _not_ include [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances. Usually, it is
1794
+ * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that.
1795
+ *
1796
+ * ```js
1797
+ * util.types.isArrayBuffer(new ArrayBuffer()); // Returns true
1798
+ * util.types.isArrayBuffer(new SharedArrayBuffer()); // Returns false
1799
+ * ```
1800
+ * @since v10.0.0
1801
+ */
1802
+ function isArrayBuffer(object: unknown): object is ArrayBuffer;
1803
+ /**
1804
+ * Returns `true` if the value is an instance of one of the [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) views, such as typed
1805
+ * array objects or [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView). Equivalent to
1806
+ * [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView).
1807
+ *
1808
+ * ```js
1809
+ * util.types.isArrayBufferView(new Int8Array()); // true
1810
+ * util.types.isArrayBufferView(Buffer.from('hello world')); // true
1811
+ * util.types.isArrayBufferView(new DataView(new ArrayBuffer(16))); // true
1812
+ * util.types.isArrayBufferView(new ArrayBuffer()); // false
1813
+ * ```
1814
+ * @since v10.0.0
1815
+ */
1816
+ function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView;
1817
+ /**
1818
+ * Returns `true` if the value is an [async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function).
1819
+ * This only reports back what the JavaScript engine is seeing;
1820
+ * in particular, the return value may not match the original source code if
1821
+ * a transpilation tool was used.
1822
+ *
1823
+ * ```js
1824
+ * util.types.isAsyncFunction(function foo() {}); // Returns false
1825
+ * util.types.isAsyncFunction(async function foo() {}); // Returns true
1826
+ * ```
1827
+ * @since v10.0.0
1828
+ */
1829
+ function isAsyncFunction(object: unknown): boolean;
1830
+ /**
1831
+ * Returns `true` if the value is a `BigInt64Array` instance.
1832
+ *
1833
+ * ```js
1834
+ * util.types.isBigInt64Array(new BigInt64Array()); // Returns true
1835
+ * util.types.isBigInt64Array(new BigUint64Array()); // Returns false
1836
+ * ```
1837
+ * @since v10.0.0
1838
+ */
1839
+ function isBigInt64Array(value: unknown): value is BigInt64Array;
1840
+ /**
1841
+ * Returns `true` if the value is a BigInt object, e.g. created
1842
+ * by `Object(BigInt(123))`.
1843
+ *
1844
+ * ```js
1845
+ * util.types.isBigIntObject(Object(BigInt(123))); // Returns true
1846
+ * util.types.isBigIntObject(BigInt(123)); // Returns false
1847
+ * util.types.isBigIntObject(123); // Returns false
1848
+ * ```
1849
+ * @since v10.4.0
1850
+ */
1851
+ function isBigIntObject(object: unknown): object is BigInt;
1852
+ /**
1853
+ * Returns `true` if the value is a `BigUint64Array` instance.
1854
+ *
1855
+ * ```js
1856
+ * util.types.isBigUint64Array(new BigInt64Array()); // Returns false
1857
+ * util.types.isBigUint64Array(new BigUint64Array()); // Returns true
1858
+ * ```
1859
+ * @since v10.0.0
1860
+ */
1861
+ function isBigUint64Array(value: unknown): value is BigUint64Array;
1862
+ /**
1863
+ * Returns `true` if the value is a boolean object, e.g. created
1864
+ * by `new Boolean()`.
1865
+ *
1866
+ * ```js
1867
+ * util.types.isBooleanObject(false); // Returns false
1868
+ * util.types.isBooleanObject(true); // Returns false
1869
+ * util.types.isBooleanObject(new Boolean(false)); // Returns true
1870
+ * util.types.isBooleanObject(new Boolean(true)); // Returns true
1871
+ * util.types.isBooleanObject(Boolean(false)); // Returns false
1872
+ * util.types.isBooleanObject(Boolean(true)); // Returns false
1873
+ * ```
1874
+ * @since v10.0.0
1875
+ */
1876
+ function isBooleanObject(object: unknown): object is Boolean;
1877
+ /**
1878
+ * Returns `true` if the value is any boxed primitive object, e.g. created
1879
+ * by `new Boolean()`, `new String()` or `Object(Symbol())`.
1880
+ *
1881
+ * For example:
1882
+ *
1883
+ * ```js
1884
+ * util.types.isBoxedPrimitive(false); // Returns false
1885
+ * util.types.isBoxedPrimitive(new Boolean(false)); // Returns true
1886
+ * util.types.isBoxedPrimitive(Symbol('foo')); // Returns false
1887
+ * util.types.isBoxedPrimitive(Object(Symbol('foo'))); // Returns true
1888
+ * util.types.isBoxedPrimitive(Object(BigInt(5))); // Returns true
1889
+ * ```
1890
+ * @since v10.11.0
1891
+ */
1892
+ function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol;
1893
+ /**
1894
+ * Returns `true` if the value is a built-in [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instance.
1895
+ *
1896
+ * ```js
1897
+ * const ab = new ArrayBuffer(20);
1898
+ * util.types.isDataView(new DataView(ab)); // Returns true
1899
+ * util.types.isDataView(new Float64Array()); // Returns false
1900
+ * ```
1901
+ *
1902
+ * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView).
1903
+ * @since v10.0.0
1904
+ */
1905
+ function isDataView(object: unknown): object is DataView;
1906
+ /**
1907
+ * Returns `true` if the value is a built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) instance.
1908
+ *
1909
+ * ```js
1910
+ * util.types.isDate(new Date()); // Returns true
1911
+ * ```
1912
+ * @since v10.0.0
1913
+ */
1914
+ function isDate(object: unknown): object is Date;
1915
+ /**
1916
+ * Returns `true` if the value is a native `External` value.
1917
+ *
1918
+ * A native `External` value is a special type of object that contains a
1919
+ * raw C++ pointer (`void*`) for access from native code, and has no other
1920
+ * properties. Such objects are created either by Node.js internals or native
1921
+ * addons. In JavaScript, they are
1922
+ * [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) objects with a
1923
+ * `null` prototype.
1924
+ *
1925
+ * ```c
1926
+ * #include <js_native_api.h>
1927
+ * #include <stdlib.h>
1928
+ * napi_value result;
1929
+ * static napi_value MyNapi(napi_env env, napi_callback_info info) {
1930
+ * int* raw = (int*) malloc(1024);
1931
+ * napi_status status = napi_create_external(env, (void*) raw, NULL, NULL, &result);
1932
+ * if (status != napi_ok) {
1933
+ * napi_throw_error(env, NULL, "napi_create_external failed");
1934
+ * return NULL;
1935
+ * }
1936
+ * return result;
1937
+ * }
1938
+ * ...
1939
+ * DECLARE_NAPI_PROPERTY("myNapi", MyNapi)
1940
+ * ...
1941
+ * ```
1942
+ *
1943
+ * ```js
1944
+ * import native from 'napi_addon.node';
1945
+ * import { types } from 'node:util';
1946
+ *
1947
+ * const data = native.myNapi();
1948
+ * types.isExternal(data); // returns true
1949
+ * types.isExternal(0); // returns false
1950
+ * types.isExternal(new String('foo')); // returns false
1951
+ * ```
1952
+ *
1953
+ * For further information on `napi_create_external`, refer to
1954
+ * [`napi_create_external()`](https://nodejs.org/docs/latest-v24.x/api/n-api.html#napi_create_external).
1955
+ * @since v10.0.0
1956
+ */
1957
+ function isExternal(object: unknown): boolean;
1958
+ /**
1959
+ * Returns `true` if the value is a built-in [`Float16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float16Array) instance.
1960
+ *
1961
+ * ```js
1962
+ * util.types.isFloat16Array(new ArrayBuffer()); // Returns false
1963
+ * util.types.isFloat16Array(new Float16Array()); // Returns true
1964
+ * util.types.isFloat16Array(new Float32Array()); // Returns false
1965
+ * ```
1966
+ * @since v24.0.0
1967
+ */
1968
+ function isFloat16Array(object: unknown): object is Float16Array;
1969
+ /**
1970
+ * Returns `true` if the value is a built-in [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) instance.
1971
+ *
1972
+ * ```js
1973
+ * util.types.isFloat32Array(new ArrayBuffer()); // Returns false
1974
+ * util.types.isFloat32Array(new Float32Array()); // Returns true
1975
+ * util.types.isFloat32Array(new Float64Array()); // Returns false
1976
+ * ```
1977
+ * @since v10.0.0
1978
+ */
1979
+ function isFloat32Array(object: unknown): object is Float32Array;
1980
+ /**
1981
+ * Returns `true` if the value is a built-in [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) instance.
1982
+ *
1983
+ * ```js
1984
+ * util.types.isFloat64Array(new ArrayBuffer()); // Returns false
1985
+ * util.types.isFloat64Array(new Uint8Array()); // Returns false
1986
+ * util.types.isFloat64Array(new Float64Array()); // Returns true
1987
+ * ```
1988
+ * @since v10.0.0
1989
+ */
1990
+ function isFloat64Array(object: unknown): object is Float64Array;
1991
+ /**
1992
+ * Returns `true` if the value is a generator function.
1993
+ * This only reports back what the JavaScript engine is seeing;
1994
+ * in particular, the return value may not match the original source code if
1995
+ * a transpilation tool was used.
1996
+ *
1997
+ * ```js
1998
+ * util.types.isGeneratorFunction(function foo() {}); // Returns false
1999
+ * util.types.isGeneratorFunction(function* foo() {}); // Returns true
2000
+ * ```
2001
+ * @since v10.0.0
2002
+ */
2003
+ function isGeneratorFunction(object: unknown): object is GeneratorFunction;
2004
+ /**
2005
+ * Returns `true` if the value is a generator object as returned from a
2006
+ * built-in generator function.
2007
+ * This only reports back what the JavaScript engine is seeing;
2008
+ * in particular, the return value may not match the original source code if
2009
+ * a transpilation tool was used.
2010
+ *
2011
+ * ```js
2012
+ * function* foo() {}
2013
+ * const generator = foo();
2014
+ * util.types.isGeneratorObject(generator); // Returns true
2015
+ * ```
2016
+ * @since v10.0.0
2017
+ */
2018
+ function isGeneratorObject(object: unknown): object is Generator;
2019
+ /**
2020
+ * Returns `true` if the value is a built-in [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) instance.
2021
+ *
2022
+ * ```js
2023
+ * util.types.isInt8Array(new ArrayBuffer()); // Returns false
2024
+ * util.types.isInt8Array(new Int8Array()); // Returns true
2025
+ * util.types.isInt8Array(new Float64Array()); // Returns false
2026
+ * ```
2027
+ * @since v10.0.0
2028
+ */
2029
+ function isInt8Array(object: unknown): object is Int8Array;
2030
+ /**
2031
+ * Returns `true` if the value is a built-in [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) instance.
2032
+ *
2033
+ * ```js
2034
+ * util.types.isInt16Array(new ArrayBuffer()); // Returns false
2035
+ * util.types.isInt16Array(new Int16Array()); // Returns true
2036
+ * util.types.isInt16Array(new Float64Array()); // Returns false
2037
+ * ```
2038
+ * @since v10.0.0
2039
+ */
2040
+ function isInt16Array(object: unknown): object is Int16Array;
2041
+ /**
2042
+ * Returns `true` if the value is a built-in [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) instance.
2043
+ *
2044
+ * ```js
2045
+ * util.types.isInt32Array(new ArrayBuffer()); // Returns false
2046
+ * util.types.isInt32Array(new Int32Array()); // Returns true
2047
+ * util.types.isInt32Array(new Float64Array()); // Returns false
2048
+ * ```
2049
+ * @since v10.0.0
2050
+ */
2051
+ function isInt32Array(object: unknown): object is Int32Array;
2052
+ /**
2053
+ * Returns `true` if the value is a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance.
2054
+ *
2055
+ * ```js
2056
+ * util.types.isMap(new Map()); // Returns true
2057
+ * ```
2058
+ * @since v10.0.0
2059
+ */
2060
+ function isMap<T>(
2061
+ object: T | {},
2062
+ ): object is T extends ReadonlyMap<any, any> ? (unknown extends T ? never : ReadonlyMap<any, any>)
2063
+ : Map<unknown, unknown>;
2064
+ /**
2065
+ * Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance.
2066
+ *
2067
+ * ```js
2068
+ * const map = new Map();
2069
+ * util.types.isMapIterator(map.keys()); // Returns true
2070
+ * util.types.isMapIterator(map.values()); // Returns true
2071
+ * util.types.isMapIterator(map.entries()); // Returns true
2072
+ * util.types.isMapIterator(map[Symbol.iterator]()); // Returns true
2073
+ * ```
2074
+ * @since v10.0.0
2075
+ */
2076
+ function isMapIterator(object: unknown): boolean;
2077
+ /**
2078
+ * Returns `true` if the value is an instance of a [Module Namespace Object](https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects).
2079
+ *
2080
+ * ```js
2081
+ * import * as ns from './a.js';
2082
+ *
2083
+ * util.types.isModuleNamespaceObject(ns); // Returns true
2084
+ * ```
2085
+ * @since v10.0.0
2086
+ */
2087
+ function isModuleNamespaceObject(value: unknown): boolean;
2088
+ /**
2089
+ * Returns `true` if the value was returned by the constructor of a
2090
+ * [built-in `Error` type](https://tc39.es/ecma262/#sec-error-objects).
2091
+ *
2092
+ * ```js
2093
+ * console.log(util.types.isNativeError(new Error())); // true
2094
+ * console.log(util.types.isNativeError(new TypeError())); // true
2095
+ * console.log(util.types.isNativeError(new RangeError())); // true
2096
+ * ```
2097
+ *
2098
+ * Subclasses of the native error types are also native errors:
2099
+ *
2100
+ * ```js
2101
+ * class MyError extends Error {}
2102
+ * console.log(util.types.isNativeError(new MyError())); // true
2103
+ * ```
2104
+ *
2105
+ * A value being `instanceof` a native error class is not equivalent to `isNativeError()`
2106
+ * returning `true` for that value. `isNativeError()` returns `true` for errors
2107
+ * which come from a different [realm](https://tc39.es/ecma262/#realm) while `instanceof Error` returns `false`
2108
+ * for these errors:
2109
+ *
2110
+ * ```js
2111
+ * import { createContext, runInContext } from 'node:vm';
2112
+ * import { types } from 'node:util';
2113
+ *
2114
+ * const context = createContext({});
2115
+ * const myError = runInContext('new Error()', context);
2116
+ * console.log(types.isNativeError(myError)); // true
2117
+ * console.log(myError instanceof Error); // false
2118
+ * ```
2119
+ *
2120
+ * Conversely, `isNativeError()` returns `false` for all objects which were not
2121
+ * returned by the constructor of a native error. That includes values
2122
+ * which are `instanceof` native errors:
2123
+ *
2124
+ * ```js
2125
+ * const myError = { __proto__: Error.prototype };
2126
+ * console.log(util.types.isNativeError(myError)); // false
2127
+ * console.log(myError instanceof Error); // true
2128
+ * ```
2129
+ * @since v10.0.0
2130
+ * @deprecated The `util.types.isNativeError` API is deprecated. Please use `Error.isError` instead.
2131
+ */
2132
+ function isNativeError(object: unknown): object is Error;
2133
+ /**
2134
+ * Returns `true` if the value is a number object, e.g. created
2135
+ * by `new Number()`.
2136
+ *
2137
+ * ```js
2138
+ * util.types.isNumberObject(0); // Returns false
2139
+ * util.types.isNumberObject(new Number(0)); // Returns true
2140
+ * ```
2141
+ * @since v10.0.0
2142
+ */
2143
+ function isNumberObject(object: unknown): object is Number;
2144
+ /**
2145
+ * Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
2146
+ *
2147
+ * ```js
2148
+ * util.types.isPromise(Promise.resolve(42)); // Returns true
2149
+ * ```
2150
+ * @since v10.0.0
2151
+ */
2152
+ function isPromise(object: unknown): object is Promise<unknown>;
2153
+ /**
2154
+ * Returns `true` if the value is a [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) instance.
2155
+ *
2156
+ * ```js
2157
+ * const target = {};
2158
+ * const proxy = new Proxy(target, {});
2159
+ * util.types.isProxy(target); // Returns false
2160
+ * util.types.isProxy(proxy); // Returns true
2161
+ * ```
2162
+ * @since v10.0.0
2163
+ */
2164
+ function isProxy(object: unknown): boolean;
2165
+ /**
2166
+ * Returns `true` if the value is a regular expression object.
2167
+ *
2168
+ * ```js
2169
+ * util.types.isRegExp(/abc/); // Returns true
2170
+ * util.types.isRegExp(new RegExp('abc')); // Returns true
2171
+ * ```
2172
+ * @since v10.0.0
2173
+ */
2174
+ function isRegExp(object: unknown): object is RegExp;
2175
+ /**
2176
+ * Returns `true` if the value is a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance.
2177
+ *
2178
+ * ```js
2179
+ * util.types.isSet(new Set()); // Returns true
2180
+ * ```
2181
+ * @since v10.0.0
2182
+ */
2183
+ function isSet<T>(
2184
+ object: T | {},
2185
+ ): object is T extends ReadonlySet<any> ? (unknown extends T ? never : ReadonlySet<any>) : Set<unknown>;
2186
+ /**
2187
+ * Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance.
2188
+ *
2189
+ * ```js
2190
+ * const set = new Set();
2191
+ * util.types.isSetIterator(set.keys()); // Returns true
2192
+ * util.types.isSetIterator(set.values()); // Returns true
2193
+ * util.types.isSetIterator(set.entries()); // Returns true
2194
+ * util.types.isSetIterator(set[Symbol.iterator]()); // Returns true
2195
+ * ```
2196
+ * @since v10.0.0
2197
+ */
2198
+ function isSetIterator(object: unknown): boolean;
2199
+ /**
2200
+ * Returns `true` if the value is a built-in [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance.
2201
+ * This does _not_ include [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instances. Usually, it is
2202
+ * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that.
2203
+ *
2204
+ * ```js
2205
+ * util.types.isSharedArrayBuffer(new ArrayBuffer()); // Returns false
2206
+ * util.types.isSharedArrayBuffer(new SharedArrayBuffer()); // Returns true
2207
+ * ```
2208
+ * @since v10.0.0
2209
+ */
2210
+ function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer;
2211
+ /**
2212
+ * Returns `true` if the value is a string object, e.g. created
2213
+ * by `new String()`.
2214
+ *
2215
+ * ```js
2216
+ * util.types.isStringObject('foo'); // Returns false
2217
+ * util.types.isStringObject(new String('foo')); // Returns true
2218
+ * ```
2219
+ * @since v10.0.0
2220
+ */
2221
+ function isStringObject(object: unknown): object is String;
2222
+ /**
2223
+ * Returns `true` if the value is a symbol object, created
2224
+ * by calling `Object()` on a `Symbol` primitive.
2225
+ *
2226
+ * ```js
2227
+ * const symbol = Symbol('foo');
2228
+ * util.types.isSymbolObject(symbol); // Returns false
2229
+ * util.types.isSymbolObject(Object(symbol)); // Returns true
2230
+ * ```
2231
+ * @since v10.0.0
2232
+ */
2233
+ function isSymbolObject(object: unknown): object is Symbol;
2234
+ /**
2235
+ * Returns `true` if the value is a built-in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance.
2236
+ *
2237
+ * ```js
2238
+ * util.types.isTypedArray(new ArrayBuffer()); // Returns false
2239
+ * util.types.isTypedArray(new Uint8Array()); // Returns true
2240
+ * util.types.isTypedArray(new Float64Array()); // Returns true
2241
+ * ```
2242
+ *
2243
+ * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView).
2244
+ * @since v10.0.0
2245
+ */
2246
+ function isTypedArray(object: unknown): object is NodeJS.TypedArray;
2247
+ /**
2248
+ * Returns `true` if the value is a built-in [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) instance.
2249
+ *
2250
+ * ```js
2251
+ * util.types.isUint8Array(new ArrayBuffer()); // Returns false
2252
+ * util.types.isUint8Array(new Uint8Array()); // Returns true
2253
+ * util.types.isUint8Array(new Float64Array()); // Returns false
2254
+ * ```
2255
+ * @since v10.0.0
2256
+ */
2257
+ function isUint8Array(object: unknown): object is Uint8Array;
2258
+ /**
2259
+ * Returns `true` if the value is a built-in [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) instance.
2260
+ *
2261
+ * ```js
2262
+ * util.types.isUint8ClampedArray(new ArrayBuffer()); // Returns false
2263
+ * util.types.isUint8ClampedArray(new Uint8ClampedArray()); // Returns true
2264
+ * util.types.isUint8ClampedArray(new Float64Array()); // Returns false
2265
+ * ```
2266
+ * @since v10.0.0
2267
+ */
2268
+ function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray;
2269
+ /**
2270
+ * Returns `true` if the value is a built-in [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) instance.
2271
+ *
2272
+ * ```js
2273
+ * util.types.isUint16Array(new ArrayBuffer()); // Returns false
2274
+ * util.types.isUint16Array(new Uint16Array()); // Returns true
2275
+ * util.types.isUint16Array(new Float64Array()); // Returns false
2276
+ * ```
2277
+ * @since v10.0.0
2278
+ */
2279
+ function isUint16Array(object: unknown): object is Uint16Array;
2280
+ /**
2281
+ * Returns `true` if the value is a built-in [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) instance.
2282
+ *
2283
+ * ```js
2284
+ * util.types.isUint32Array(new ArrayBuffer()); // Returns false
2285
+ * util.types.isUint32Array(new Uint32Array()); // Returns true
2286
+ * util.types.isUint32Array(new Float64Array()); // Returns false
2287
+ * ```
2288
+ * @since v10.0.0
2289
+ */
2290
+ function isUint32Array(object: unknown): object is Uint32Array;
2291
+ /**
2292
+ * Returns `true` if the value is a built-in [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) instance.
2293
+ *
2294
+ * ```js
2295
+ * util.types.isWeakMap(new WeakMap()); // Returns true
2296
+ * ```
2297
+ * @since v10.0.0
2298
+ */
2299
+ function isWeakMap(object: unknown): object is WeakMap<object, unknown>;
2300
+ /**
2301
+ * Returns `true` if the value is a built-in [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) instance.
2302
+ *
2303
+ * ```js
2304
+ * util.types.isWeakSet(new WeakSet()); // Returns true
2305
+ * ```
2306
+ * @since v10.0.0
2307
+ */
2308
+ function isWeakSet(object: unknown): object is WeakSet<object>;
2309
+ /**
2310
+ * Returns `true` if `value` is a `KeyObject`, `false` otherwise.
2311
+ * @since v16.2.0
2312
+ */
2313
+ function isKeyObject(object: unknown): object is KeyObject;
2314
+ /**
2315
+ * Returns `true` if `value` is a `CryptoKey`, `false` otherwise.
2316
+ * @since v16.2.0
2317
+ */
2318
+ function isCryptoKey(object: unknown): object is webcrypto.CryptoKey;
2319
+ }
2320
+ declare module "node:util" {
2321
+ export * from "util";
2322
+ }
2323
+ declare module "node:util/types" {
2324
+ export * from "util/types";
2325
+ }