@kaeawc/auto-mobile 0.0.91 → 0.0.93

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 (272) hide show
  1. package/dist/build-info.json +12 -12
  2. package/dist/schemas/README.md +16 -0
  3. package/dist/schemas/prototype-icon-names.json +302 -0
  4. package/dist/schemas/test-plan.schema.json +370 -52
  5. package/dist/src/chunk-00167wan.js +55 -0
  6. package/dist/src/chunk-0jrrsnc9.js +6 -0
  7. package/dist/src/chunk-0n6swkwg.js +5 -0
  8. package/dist/src/chunk-0qsy1qsx.js +57 -0
  9. package/dist/src/chunk-11m8wj8j.js +237 -0
  10. package/dist/src/chunk-1p7xf5kb.js +5 -0
  11. package/dist/src/chunk-23p5f095.js +4 -0
  12. package/dist/src/chunk-26k317v5.js +5 -0
  13. package/dist/src/chunk-284ptqa4.js +7 -0
  14. package/dist/src/chunk-28re4xrg.js +4 -0
  15. package/dist/src/chunk-2f9rkmhx.js +5 -0
  16. package/dist/src/chunk-2fxdh48t.js +4 -0
  17. package/dist/src/chunk-2tbdrbt6.js +4 -0
  18. package/dist/src/chunk-2tqzq5qh.js +971 -0
  19. package/dist/src/chunk-32gvv9b4.js +21 -0
  20. package/dist/src/chunk-3f3t1x97.js +8 -0
  21. package/dist/src/chunk-3fspkbc7.js +4 -0
  22. package/dist/src/chunk-3qwrzxh0.js +11 -0
  23. package/dist/src/chunk-3sy6ahhz.js +26 -0
  24. package/dist/src/chunk-3vg455e6.js +4 -0
  25. package/dist/src/chunk-3xkpk44w.js +5 -0
  26. package/dist/src/chunk-3y6eykz9.js +4 -0
  27. package/dist/src/chunk-49bsqdx3.js +4 -0
  28. package/dist/src/chunk-4hw3665t.js +42 -0
  29. package/dist/src/chunk-58wzr3mt.js +5 -0
  30. package/dist/src/chunk-5d2hft6c.js +5 -0
  31. package/dist/src/chunk-5s645vr4.js +4 -0
  32. package/dist/src/chunk-5snsn9cf.js +4 -0
  33. package/dist/src/chunk-5tm9mn47.js +54 -0
  34. package/dist/src/chunk-5zc77a5t.js +4 -0
  35. package/dist/src/chunk-64j0majr.js +19 -0
  36. package/dist/src/chunk-65y8v4td.js +17 -0
  37. package/dist/src/chunk-6awz7vhq.js +5 -0
  38. package/dist/src/chunk-6bznss4t.js +8 -0
  39. package/dist/src/chunk-6ep7f5ge.js +4 -0
  40. package/dist/src/chunk-6pg7bqck.js +4 -0
  41. package/dist/src/chunk-6wt9rgjf.js +5 -0
  42. package/dist/src/chunk-6xmss8er.js +8 -0
  43. package/dist/src/chunk-710rxz9y.js +5 -0
  44. package/dist/src/chunk-7cs2da62.js +5 -0
  45. package/dist/src/chunk-7g103b54.js +4 -0
  46. package/dist/src/chunk-7j5vj4pa.js +4 -0
  47. package/dist/src/chunk-7rz9898k.js +5 -0
  48. package/dist/src/chunk-7tw8x05v.js +4 -0
  49. package/dist/src/chunk-7zy586cb.js +4 -0
  50. package/dist/src/chunk-8037tzzj.js +5 -0
  51. package/dist/src/chunk-84nanf8s.js +5 -0
  52. package/dist/src/chunk-8g1922rp.js +10 -0
  53. package/dist/src/chunk-8gvwcv2p.js +4 -0
  54. package/dist/src/chunk-8ph29g99.js +4 -0
  55. package/dist/src/chunk-8thrmfat.js +4 -0
  56. package/dist/src/chunk-8zgzzs7k.js +78 -0
  57. package/dist/src/chunk-97b1zmaq.js +4 -0
  58. package/dist/src/chunk-9fth9ayh.js +4 -0
  59. package/dist/src/chunk-9j6anhjr.js +4 -0
  60. package/dist/src/chunk-aabchzxk.js +9 -0
  61. package/dist/src/chunk-ayp07wbb.js +4 -0
  62. package/dist/src/chunk-bfjwqk8q.js +4 -0
  63. package/dist/src/chunk-bfw6125s.js +5 -0
  64. package/dist/src/chunk-bnhscm2n.js +4 -0
  65. package/dist/src/chunk-bxmsax22.js +5 -0
  66. package/dist/src/chunk-c1vs4g1n.js +4 -0
  67. package/dist/src/chunk-ct3e7yng.js +4 -0
  68. package/dist/src/chunk-cyy71ggq.js +5 -0
  69. package/dist/src/chunk-ddzkz92z.js +4 -0
  70. package/dist/src/chunk-dgrbdpb7.js +9 -0
  71. package/dist/src/chunk-drdz8hee.js +5 -0
  72. package/dist/src/chunk-e98dqnc9.js +145 -0
  73. package/dist/src/chunk-eersndy7.js +5 -0
  74. package/dist/src/chunk-eggq53ks.js +4 -0
  75. package/dist/src/chunk-f2dya7cs.js +4 -0
  76. package/dist/src/chunk-fbakd6cw.js +4 -0
  77. package/dist/src/chunk-fgb98zjj.js +5 -0
  78. package/dist/src/chunk-fmpad823.js +5 -0
  79. package/dist/src/chunk-g04bwyj3.js +4 -0
  80. package/dist/src/chunk-g0xr8zw0.js +4 -0
  81. package/dist/src/chunk-g3rjs80x.js +4 -0
  82. package/dist/src/chunk-g78rtrfv.js +4 -0
  83. package/dist/src/chunk-g7tmjbkt.js +5 -0
  84. package/dist/src/chunk-gabgv3y5.js +4 -0
  85. package/dist/src/chunk-gmr45m8f.js +4 -0
  86. package/dist/src/chunk-gsyfebqj.js +4 -0
  87. package/dist/src/chunk-h5rpn9wr.js +247 -0
  88. package/dist/src/chunk-hb1x7v55.js +4 -0
  89. package/dist/src/chunk-hrfytkxh.js +168 -0
  90. package/dist/src/chunk-j4yjzbak.js +4 -0
  91. package/dist/src/chunk-jd6a5v6p.js +5 -0
  92. package/dist/src/chunk-jh6vhqzx.js +5 -0
  93. package/dist/src/chunk-kn5spq15.js +4 -0
  94. package/dist/src/chunk-m94qs0f0.js +4 -0
  95. package/dist/src/chunk-mjrps0ac.js +7 -0
  96. package/dist/src/chunk-n03dmn5q.js +5 -0
  97. package/dist/src/chunk-n72qhwd9.js +4 -0
  98. package/dist/src/chunk-ndt1ccxm.js +71 -0
  99. package/dist/src/chunk-nr6y0n4y.js +5 -0
  100. package/dist/src/chunk-pcsen2vs.js +4 -0
  101. package/dist/src/chunk-ppfr0b8h.js +4 -0
  102. package/dist/src/chunk-q10bdnat.js +4 -0
  103. package/dist/src/chunk-q9xmq595.js +4 -0
  104. package/dist/src/chunk-qcxzr2my.js +5 -0
  105. package/dist/src/chunk-qf6nynk6.js +7 -0
  106. package/dist/src/chunk-qyqypn28.js +5 -0
  107. package/dist/src/chunk-r2epb56s.js +4 -0
  108. package/dist/src/chunk-r5bxavdx.js +311 -0
  109. package/dist/src/chunk-r6z1eztj.js +18 -0
  110. package/dist/src/chunk-r7bpkgff.js +4 -0
  111. package/dist/src/chunk-r8jf3d92.js +4 -0
  112. package/dist/src/chunk-rbpdk7m0.js +5 -0
  113. package/dist/src/chunk-rc0dbypm.js +4 -0
  114. package/dist/src/chunk-rhcty4ms.js +4 -0
  115. package/dist/src/chunk-rpvckv3p.js +4 -0
  116. package/dist/src/chunk-rqc9ap3x.js +4 -0
  117. package/dist/src/chunk-rvvy1bte.js +7 -0
  118. package/dist/src/chunk-ry0mz41y.js +4 -0
  119. package/dist/src/chunk-s3jc6cwp.js +5 -0
  120. package/dist/src/chunk-sfv61xjb.js +6 -0
  121. package/dist/src/chunk-t6bfvfkg.js +4 -0
  122. package/dist/src/chunk-t6c8akcm.js +5 -0
  123. package/dist/src/chunk-t7w8rctc.js +4 -0
  124. package/dist/src/chunk-thbh3jew.js +5 -0
  125. package/dist/src/chunk-v2wd4n3e.js +5 -0
  126. package/dist/src/chunk-v6pya0dm.js +5 -0
  127. package/dist/src/chunk-vy3bwm1d.js +17 -0
  128. package/dist/src/chunk-w3vs79ex.js +27 -0
  129. package/dist/src/chunk-w4zga19f.js +4 -0
  130. package/dist/src/chunk-w5b2jwk3.js +14 -0
  131. package/dist/src/chunk-w7hkv422.js +5 -0
  132. package/dist/src/chunk-waqwcjyn.js +4 -0
  133. package/dist/src/chunk-wbh8spm5.js +20 -0
  134. package/dist/src/chunk-wyrkw6hw.js +5 -0
  135. package/dist/src/chunk-xa73x2cx.js +5 -0
  136. package/dist/src/chunk-xgan0qqp.js +4 -0
  137. package/dist/src/chunk-y2vs6jwg.js +4 -0
  138. package/dist/src/chunk-yattm52s.js +4 -0
  139. package/dist/src/chunk-yb97j25b.js +6 -0
  140. package/dist/src/chunk-ybbtagbt.js +5 -0
  141. package/dist/src/chunk-ycaj2sgf.js +9 -0
  142. package/dist/src/chunk-yf7ympyz.js +325 -0
  143. package/dist/src/chunk-yjawdzk8.js +4 -0
  144. package/dist/src/chunk-z637nqg8.js +11 -0
  145. package/dist/src/chunk-zgja5f3p.js +6 -0
  146. package/dist/src/chunk-zs1sghs9.js +4 -0
  147. package/dist/src/daemon/processEntry.js +4 -0
  148. package/dist/src/index.js +4 -2843
  149. package/dist/src/runtime/bunRuntimeGuard.js +4 -0
  150. package/dist/src/utils/workers/iosBundleExtractWorker.js +2 -3
  151. package/ios/CameraPosterInjection/Injection/CameraPosterInjection.m +466 -0
  152. package/package.json +7 -6
  153. package/schemas/README.md +16 -0
  154. package/schemas/prototype-icon-names.json +302 -0
  155. package/schemas/test-plan.schema.json +370 -52
  156. package/node_modules/@borewit/text-codec/README.md +0 -87
  157. package/node_modules/@jimp/diff/node_modules/pixelmatch/README.md +0 -110
  158. package/node_modules/@jimp/diff/node_modules/pixelmatch/node_modules/pngjs/README.md +0 -433
  159. package/node_modules/@jimp/file-ops/dist/browser/index.js +0 -8
  160. package/node_modules/@jimp/js-png/README.md +0 -35
  161. package/node_modules/@jimp/js-png/src/__image_snapshots__/index-node-test-ts-png-should-use-png-options-1-snap.png +0 -0
  162. package/node_modules/@jimp/js-png/src/output.png +0 -0
  163. package/node_modules/@jimp/js-png/vitest.config.browser.mjs +0 -3
  164. package/node_modules/@jimp/plugin-resize/README.md +0 -12
  165. package/node_modules/@jimp/plugin-resize/vitest.config.browser.mjs +0 -3
  166. package/node_modules/@tokenizer/inflate/README.md +0 -114
  167. package/node_modules/@tokenizer/token/README.md +0 -19
  168. package/node_modules/await-to-js/README.md +0 -82
  169. package/node_modules/debug/README.md +0 -481
  170. package/node_modules/exif-parser/README.md +0 -83
  171. package/node_modules/file-type/readme.md +0 -667
  172. package/node_modules/ieee754/README.md +0 -51
  173. package/node_modules/mime/README.md +0 -178
  174. package/node_modules/ms/readme.md +0 -59
  175. package/node_modules/parse-bmfont-xml/README.md +0 -74
  176. package/node_modules/parse-bmfont-xml/lib/browser.js +0 -85
  177. package/node_modules/parse-bmfont-xml/node_modules/xml2js/README.md +0 -507
  178. package/node_modules/pngjs/README.md +0 -287
  179. package/node_modules/sax/README.md +0 -228
  180. package/node_modules/strtok3/README.md +0 -795
  181. package/node_modules/tinycolor2/README.md +0 -492
  182. package/node_modules/tinycolor2/cjs/test.js +0 -2191
  183. package/node_modules/tinycolor2/cjs/test_template.js +0 -26
  184. package/node_modules/tinycolor2/deno_asserts@0.168.0.mjs +0 -807
  185. package/node_modules/tinycolor2/esm/test.js +0 -2189
  186. package/node_modules/tinycolor2/esm/test_template.js +0 -24
  187. package/node_modules/tinycolor2/tinycolor.js +0 -1191
  188. package/node_modules/token-types/README.md +0 -160
  189. package/node_modules/uint8array-extras/readme.md +0 -318
  190. package/node_modules/xml-parse-from-string/README.md +0 -35
  191. package/node_modules/xmlbuilder/README.md +0 -86
  192. package/node_modules/zod/README.md +0 -208
  193. package/node_modules/zod/v4/locales/ar.d.cts +0 -4
  194. package/node_modules/zod/v4/locales/ar.d.ts +0 -4
  195. package/node_modules/zod/v4/locales/az.d.cts +0 -4
  196. package/node_modules/zod/v4/locales/az.d.ts +0 -4
  197. package/node_modules/zod/v4/locales/be.d.cts +0 -4
  198. package/node_modules/zod/v4/locales/be.d.ts +0 -4
  199. package/node_modules/zod/v4/locales/ca.d.cts +0 -4
  200. package/node_modules/zod/v4/locales/ca.d.ts +0 -4
  201. package/node_modules/zod/v4/locales/cs.d.cts +0 -4
  202. package/node_modules/zod/v4/locales/cs.d.ts +0 -4
  203. package/node_modules/zod/v4/locales/de.d.cts +0 -4
  204. package/node_modules/zod/v4/locales/de.d.ts +0 -4
  205. package/node_modules/zod/v4/locales/en.d.cts +0 -5
  206. package/node_modules/zod/v4/locales/en.d.ts +0 -5
  207. package/node_modules/zod/v4/locales/eo.d.cts +0 -5
  208. package/node_modules/zod/v4/locales/eo.d.ts +0 -5
  209. package/node_modules/zod/v4/locales/es.d.cts +0 -4
  210. package/node_modules/zod/v4/locales/es.d.ts +0 -4
  211. package/node_modules/zod/v4/locales/fa.d.cts +0 -4
  212. package/node_modules/zod/v4/locales/fa.d.ts +0 -4
  213. package/node_modules/zod/v4/locales/fi.d.cts +0 -4
  214. package/node_modules/zod/v4/locales/fi.d.ts +0 -4
  215. package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -4
  216. package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
  217. package/node_modules/zod/v4/locales/fr.d.cts +0 -4
  218. package/node_modules/zod/v4/locales/fr.d.ts +0 -4
  219. package/node_modules/zod/v4/locales/he.d.cts +0 -4
  220. package/node_modules/zod/v4/locales/he.d.ts +0 -4
  221. package/node_modules/zod/v4/locales/hu.d.cts +0 -4
  222. package/node_modules/zod/v4/locales/hu.d.ts +0 -4
  223. package/node_modules/zod/v4/locales/id.d.cts +0 -4
  224. package/node_modules/zod/v4/locales/id.d.ts +0 -4
  225. package/node_modules/zod/v4/locales/index.d.cts +0 -39
  226. package/node_modules/zod/v4/locales/index.d.ts +0 -39
  227. package/node_modules/zod/v4/locales/it.d.cts +0 -4
  228. package/node_modules/zod/v4/locales/it.d.ts +0 -4
  229. package/node_modules/zod/v4/locales/ja.d.cts +0 -4
  230. package/node_modules/zod/v4/locales/ja.d.ts +0 -4
  231. package/node_modules/zod/v4/locales/kh.d.cts +0 -4
  232. package/node_modules/zod/v4/locales/kh.d.ts +0 -4
  233. package/node_modules/zod/v4/locales/ko.d.cts +0 -4
  234. package/node_modules/zod/v4/locales/ko.d.ts +0 -4
  235. package/node_modules/zod/v4/locales/mk.d.cts +0 -4
  236. package/node_modules/zod/v4/locales/mk.d.ts +0 -4
  237. package/node_modules/zod/v4/locales/ms.d.cts +0 -4
  238. package/node_modules/zod/v4/locales/ms.d.ts +0 -4
  239. package/node_modules/zod/v4/locales/nl.d.cts +0 -4
  240. package/node_modules/zod/v4/locales/nl.d.ts +0 -4
  241. package/node_modules/zod/v4/locales/no.d.cts +0 -4
  242. package/node_modules/zod/v4/locales/no.d.ts +0 -4
  243. package/node_modules/zod/v4/locales/ota.d.cts +0 -4
  244. package/node_modules/zod/v4/locales/ota.d.ts +0 -4
  245. package/node_modules/zod/v4/locales/pl.d.cts +0 -4
  246. package/node_modules/zod/v4/locales/pl.d.ts +0 -4
  247. package/node_modules/zod/v4/locales/ps.d.cts +0 -4
  248. package/node_modules/zod/v4/locales/ps.d.ts +0 -4
  249. package/node_modules/zod/v4/locales/pt.d.cts +0 -4
  250. package/node_modules/zod/v4/locales/pt.d.ts +0 -4
  251. package/node_modules/zod/v4/locales/ru.d.cts +0 -4
  252. package/node_modules/zod/v4/locales/ru.d.ts +0 -4
  253. package/node_modules/zod/v4/locales/sl.d.cts +0 -4
  254. package/node_modules/zod/v4/locales/sl.d.ts +0 -4
  255. package/node_modules/zod/v4/locales/sv.d.cts +0 -4
  256. package/node_modules/zod/v4/locales/sv.d.ts +0 -4
  257. package/node_modules/zod/v4/locales/ta.d.cts +0 -4
  258. package/node_modules/zod/v4/locales/ta.d.ts +0 -4
  259. package/node_modules/zod/v4/locales/th.d.cts +0 -4
  260. package/node_modules/zod/v4/locales/th.d.ts +0 -4
  261. package/node_modules/zod/v4/locales/tr.d.cts +0 -5
  262. package/node_modules/zod/v4/locales/tr.d.ts +0 -5
  263. package/node_modules/zod/v4/locales/ua.d.cts +0 -4
  264. package/node_modules/zod/v4/locales/ua.d.ts +0 -4
  265. package/node_modules/zod/v4/locales/ur.d.cts +0 -4
  266. package/node_modules/zod/v4/locales/ur.d.ts +0 -4
  267. package/node_modules/zod/v4/locales/vi.d.cts +0 -4
  268. package/node_modules/zod/v4/locales/vi.d.ts +0 -4
  269. package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -4
  270. package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
  271. package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -4
  272. package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
@@ -1,114 +0,0 @@
1
- [![Node.js CI](https://github.com/Borewit/tokenizer-inflate/actions/workflows/nodejs-ci.yml/badge.svg)](https://github.com/Borewit/tokenizer-inflate/actions/workflows/nodejs-ci.yml)
2
- [![NPM version](https://badge.fury.io/js/%40tokenizer%2Finflate.svg)](https://npmjs.org/package/@tokenizer/inflate)
3
- [![npm downloads](https://img.shields.io/npm/dm/@tokenizer%2Finflate.svg)](https://npmcharts.com/compare/%40tokenizer%2Finflate?start=1200&interval=30)
4
-
5
- # @tokenizer/inflate
6
-
7
- `@tokenizer/inflate` is a package designed for handling and extracting data from ZIP files efficiently using a tokenizer-based approach.
8
- The library provides a customizable way to parse ZIP archives and extract compressed data while minimizing memory usage.
9
-
10
- ## Features
11
- - Efficient Decompression: Handles streams compressed with DEFLATE and related formats (e.g., gzip).
12
- - Tokenizer Compatibility: Seamlessly integrates with [strtok3](https://github.com/Borewit/strtok3). For example, use [@tokenizer/s3](https://github.com/Borewit/tokenizer-s3) for efficient partial extraction of a Zip stored on AWS S3 cloud file storage.
13
- - Streamlined Interface: Provides an intuitive API for working with compressed data in streaming and random-access scenarios.
14
- - Chunked Data Access: Leverages the underlying media's capabilities to offer chunked or random access to data, unlike traditional streams.
15
- - Plug-and-Play: Easily integrate with existing tokenizer-based workflows for parsing file metadata or binary structures.
16
- - Interrupt the extraction process conditionally.
17
-
18
- ## Installation
19
- ```bash
20
- npm install @tokenizer/inflate
21
- ```
22
-
23
- ## Usage
24
-
25
- ### Example: Extracting Specific Files
26
-
27
- The following example demonstrates how to use the library to extract .txt files and stop processing when encountering a .stop file.
28
-
29
- ```js
30
- import { ZipHandler } from '@tokenizer/inflate';
31
- import { fromFile } from 'strtok3';
32
-
33
- const fileFilter = (file) => {
34
- console.log(`Processing file: ${file.filename}`);
35
-
36
- if (file.filename?.endsWith(".stop")) {
37
- console.log(`Stopping processing due to file: ${file.filename}`);
38
- return { handler: false, stop: true }; // Stop the unzip process
39
- }
40
-
41
- if (file.filename?.endsWith(".txt")) {
42
- return {
43
- handler: async (data) => {
44
- console.log(`Extracted text file: ${file.filename}`);
45
- console.log(new TextDecoder().decode(data));
46
- },
47
- };
48
- }
49
-
50
- return { handler: false }; // Ignore other files
51
- };
52
-
53
- async function extractFiles(zipFilePath) {
54
- const tokenizer = await fromFile(zipFilePath);
55
- const zipHandler = new ZipHandler(tokenizer);
56
- await zipHandler.unzip(fileFilter);
57
- }
58
-
59
- extractFiles('example.zip').catch(console.error);
60
- ```
61
-
62
- ## API
63
-
64
- ### `ZipHandler`
65
- A class for handling ZIP file parsing and extraction.
66
- #### Constructor
67
- ```ts
68
- new ZipHandler(tokenizer: ITokenizer)
69
- ```
70
- - **tokenizer**: An instance of ITokenizer to read the ZIP archive.
71
- #### Methods
72
-
73
- - `isZip(): Promise<boolean>`
74
-
75
- Determines whether the input file is a ZIP archive.
76
-
77
- - `unzip(fileCb: InflateFileFilter): Promise<void>`
78
-
79
- Extracts files from the ZIP archive, applying the provided `InflateFileFilter` callback to each file.
80
-
81
- ```InflatedDataHandler```
82
-
83
- ## Types
84
-
85
- ### `InflateFileFilter`
86
- ```ts
87
- type InflateFileFilter = (file: IFullZipHeader) => InflateFileFilterResult;
88
- ```
89
- Callback function to determine whether a file should be handled or ignored.
90
-
91
- ### `InflateFileFilterResult`
92
- ```ts
93
- type InflateFileFilterResult = {
94
- handler: InflatedDataHandler | false; // Handle file data or ignore
95
- stop?: boolean; // Stop processing further files
96
- };
97
-
98
- ```
99
- Returned from `InflateFileFilter` to control file handling and extraction flow.
100
-
101
- ### `InflatedDataHandler`
102
- ```ts
103
- type InflatedDataHandler = (fileData: Uint8Array) => Promise<void>;
104
- ```
105
- Handler for processing uncompressed file data.
106
-
107
- ## Compatibility
108
-
109
- This module is a [pure ECMAScript Module (ESM)](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
110
- The distributed JavaScript codebase is compliant with the [ECMAScript 2020 (11th Edition)](https://en.wikipedia.org/wiki/ECMAScript_version_history#11th_Edition_%E2%80%93_ECMAScript_2020) standard.
111
- If used with Node.js, it requires version ≥ 18.
112
-
113
- ## License
114
- This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
@@ -1,19 +0,0 @@
1
- [![npm version](https://badge.fury.io/js/%40tokenizer%2Ftoken.svg)](https://www.npmjs.com/package/@tokenizer/token)
2
- [![npm downloads](http://img.shields.io/npm/dm/@tokenizer/token.svg)](https://npmcharts.com/compare/@tokenizer/token?interval=30)
3
-
4
- # @tokenizer/token
5
-
6
- TypeScript definition of an [strtok3](https://github.com/Borewit/strtok3) token.
7
-
8
- ## Licence
9
-
10
- (The MIT License)
11
-
12
- Copyright (c) 2020 Borewit
13
-
14
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
17
-
18
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
-
@@ -1,82 +0,0 @@
1
- # await-to-js
2
-
3
- [![NPM version][npm-image]][npm-url]
4
- [![Downloads][download-badge]][npm-url]
5
-
6
- > Async await wrapper for easy error handling
7
-
8
- ## Pre-requisites
9
- You need to use Node 7.6 (or later) or an ES7 transpiler in order to use async/await functionality.
10
- You can use babel or typescript for that.
11
-
12
- ## Install
13
-
14
- ```sh
15
- npm i await-to-js --save
16
- ```
17
-
18
- ## Usage
19
-
20
- ```js
21
- import to from 'await-to-js';
22
- // If you use CommonJS (i.e NodeJS environment), it should be:
23
- // const to = require('await-to-js').default;
24
-
25
- async function asyncTaskWithCb(cb) {
26
- let err, user, savedTask, notification;
27
-
28
- [ err, user ] = await to(UserModel.findById(1));
29
- if(!user) return cb('No user found');
30
-
31
- [ err, savedTask ] = await to(TaskModel({userId: user.id, name: 'Demo Task'}));
32
- if(err) return cb('Error occurred while saving task');
33
-
34
- if(user.notificationsEnabled) {
35
- [ err ] = await to(NotificationService.sendNotification(user.id, 'Task Created'));
36
- if(err) return cb('Error while sending notification');
37
- }
38
-
39
- if(savedTask.assignedUser.id !== user.id) {
40
- [ err, notification ] = await to(NotificationService.sendNotification(savedTask.assignedUser.id, 'Task was created for you'));
41
- if(err) return cb('Error while sending notification');
42
- }
43
-
44
- cb(null, savedTask);
45
- }
46
-
47
- async function asyncFunctionWithThrow() {
48
- const [err, user] = await to(UserModel.findById(1));
49
- if (!user) throw new Error('User not found');
50
-
51
- }
52
- ```
53
-
54
- ## TypeScript usage
55
- ```javascript
56
- interface ServerResponse {
57
- test: number;
58
- }
59
-
60
- const p = Promise.resolve({test: 123});
61
-
62
- const [err, data] = await to<ServerResponse>(p);
63
- console.log(data.test);
64
- ```
65
-
66
- ## License
67
-
68
- MIT © [Dima Grossman](http://blog.grossman.io) && Tomer Barnea
69
-
70
- [npm-url]: https://npmjs.org/package/await-to-js
71
- [npm-image]: https://img.shields.io/npm/v/await-to-js.svg?style=flat-square
72
-
73
- [travis-url]: https://travis-ci.org/scopsy/await-to-js
74
- [travis-image]: https://img.shields.io/travis/scopsy/await-to-js.svg?style=flat-square
75
-
76
- [coveralls-url]: https://coveralls.io/r/scopsy/await-to-js
77
- [coveralls-image]: https://img.shields.io/coveralls/scopsy/await-to-js.svg?style=flat-square
78
-
79
- [depstat-url]: https://david-dm.org/scopsy/await-to-js
80
- [depstat-image]: https://david-dm.org/scopsy/await-to-js.svg?style=flat-square
81
-
82
- [download-badge]: http://img.shields.io/npm/dm/await-to-js.svg?style=flat-square