@kaeawc/auto-mobile 0.0.91 → 0.0.92

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 (267) 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/src/chunk-09442h7v.js +4 -0
  5. package/dist/src/chunk-0dfnyfkh.js +5 -0
  6. package/dist/src/chunk-0e4gm1kj.js +5 -0
  7. package/dist/src/chunk-0eb8576f.js +4 -0
  8. package/dist/src/chunk-0rjm4nx7.js +5 -0
  9. package/dist/src/chunk-0w1spptt.js +6 -0
  10. package/dist/src/chunk-1zmh2eak.js +4 -0
  11. package/dist/src/chunk-28k63ha3.js +5 -0
  12. package/dist/src/chunk-2d4wmp8b.js +4 -0
  13. package/dist/src/chunk-2e6s75qv.js +78 -0
  14. package/dist/src/chunk-2v7tw1nj.js +5 -0
  15. package/dist/src/chunk-32jpxz2y.js +323 -0
  16. package/dist/src/chunk-34zxqcmq.js +5 -0
  17. package/dist/src/chunk-3jmvqygr.js +238 -0
  18. package/dist/src/chunk-3swvfhqt.js +5 -0
  19. package/dist/src/chunk-44bt78m9.js +5 -0
  20. package/dist/src/chunk-488vt2bp.js +4 -0
  21. package/dist/src/chunk-4fgdhcwx.js +5 -0
  22. package/dist/src/chunk-4jp2se4w.js +4 -0
  23. package/dist/src/chunk-4pfftt07.js +5 -0
  24. package/dist/src/chunk-4vhr9e4t.js +4 -0
  25. package/dist/src/chunk-4xd6zs3y.js +15 -0
  26. package/dist/src/chunk-51567pg8.js +4 -0
  27. package/dist/src/chunk-5agqsfev.js +4 -0
  28. package/dist/src/chunk-5d706gmr.js +4 -0
  29. package/dist/src/chunk-5kd4rqk7.js +5 -0
  30. package/dist/src/chunk-5s645vr4.js +4 -0
  31. package/dist/src/chunk-61t538bm.js +4 -0
  32. package/dist/src/chunk-6d3mmqxt.js +54 -0
  33. package/dist/src/chunk-6hyt398x.js +5 -0
  34. package/dist/src/chunk-6mnr8kpm.js +4 -0
  35. package/dist/src/chunk-6pg7bqck.js +4 -0
  36. package/dist/src/chunk-79q5xsdc.js +42 -0
  37. package/dist/src/chunk-7bdgand3.js +4 -0
  38. package/dist/src/chunk-84cp9dw5.js +4 -0
  39. package/dist/src/chunk-86f2h5ww.js +5 -0
  40. package/dist/src/chunk-8cghfzb2.js +19 -0
  41. package/dist/src/chunk-8en08r7q.js +5 -0
  42. package/dist/src/chunk-950qcq1e.js +10 -0
  43. package/dist/src/chunk-9rkfyt6q.js +5 -0
  44. package/dist/src/chunk-9tf2p9y9.js +5 -0
  45. package/dist/src/chunk-9y5bcy28.js +6 -0
  46. package/dist/src/chunk-a2sc4jm0.js +5 -0
  47. package/dist/src/chunk-a4k9rt7z.js +5 -0
  48. package/dist/src/chunk-aa5ng3d1.js +4 -0
  49. package/dist/src/chunk-ajsrz473.js +5 -0
  50. package/dist/src/chunk-b3h0a6ca.js +4 -0
  51. package/dist/src/chunk-b4cxdzwy.js +20 -0
  52. package/dist/src/chunk-b6a737qt.js +4 -0
  53. package/dist/src/chunk-bn64x5z5.js +5 -0
  54. package/dist/src/chunk-bvh649za.js +12 -0
  55. package/dist/src/chunk-c9nk1r78.js +5 -0
  56. package/dist/src/chunk-c9tyfg4j.js +26 -0
  57. package/dist/src/chunk-cfsdfqnm.js +4 -0
  58. package/dist/src/chunk-cxyf04jc.js +7 -0
  59. package/dist/src/chunk-d57432wq.js +4 -0
  60. package/dist/src/chunk-da08tx5v.js +4 -0
  61. package/dist/src/chunk-eka89q3k.js +4 -0
  62. package/dist/src/chunk-f2tc08m2.js +4 -0
  63. package/dist/src/chunk-f8tnk179.js +5 -0
  64. package/dist/src/chunk-f9s1kkhx.js +5 -0
  65. package/dist/src/chunk-fbp8a4rx.js +4 -0
  66. package/dist/src/chunk-fd2z0sze.js +4 -0
  67. package/dist/src/chunk-fk927f4q.js +54 -0
  68. package/dist/src/chunk-fxmr3a0f.js +4 -0
  69. package/dist/src/chunk-gaqwhd44.js +4 -0
  70. package/dist/src/chunk-ggtd5x5a.js +5 -0
  71. package/dist/src/chunk-gndcfrm7.js +4 -0
  72. package/dist/src/chunk-h3n4adc6.js +310 -0
  73. package/dist/src/chunk-h5pjbb83.js +4 -0
  74. package/dist/src/chunk-hgnnh302.js +4 -0
  75. package/dist/src/chunk-hmke8nhx.js +5 -0
  76. package/dist/src/chunk-j2bx12hn.js +4 -0
  77. package/dist/src/chunk-j70y1a2g.js +4 -0
  78. package/dist/src/chunk-jdqvcq0a.js +5 -0
  79. package/dist/src/chunk-jhnbfj19.js +55 -0
  80. package/dist/src/chunk-js1jpyxp.js +6 -0
  81. package/dist/src/chunk-kbjq0qvb.js +4 -0
  82. package/dist/src/chunk-kfwx57xd.js +4 -0
  83. package/dist/src/chunk-km0dy5vc.js +71 -0
  84. package/dist/src/chunk-kzwctna2.js +4 -0
  85. package/dist/src/chunk-m9ehyehy.js +4 -0
  86. package/dist/src/chunk-mct91p1f.js +4 -0
  87. package/dist/src/chunk-mf9spd4g.js +5 -0
  88. package/dist/src/chunk-mgrcansb.js +4 -0
  89. package/dist/src/chunk-mqc1d0eb.js +6 -0
  90. package/dist/src/chunk-n1zmpk0z.js +4 -0
  91. package/dist/src/chunk-ncyjf63g.js +4 -0
  92. package/dist/src/chunk-nr64d21q.js +973 -0
  93. package/dist/src/chunk-nwm2pq5v.js +168 -0
  94. package/dist/src/chunk-pm06b05d.js +9 -0
  95. package/dist/src/chunk-q50s00ry.js +4 -0
  96. package/dist/src/chunk-qv2918jt.js +4 -0
  97. package/dist/src/chunk-qwye1958.js +14 -0
  98. package/dist/src/chunk-r0f1q783.js +5 -0
  99. package/dist/src/chunk-r14wwk37.js +18 -0
  100. package/dist/src/chunk-r20pe1nv.js +5 -0
  101. package/dist/src/chunk-r8z9pfve.js +5 -0
  102. package/dist/src/chunk-rdpgkjf6.js +4 -0
  103. package/dist/src/chunk-rkr0dks9.js +5 -0
  104. package/dist/src/chunk-rn84t3sf.js +11 -0
  105. package/dist/src/chunk-s123kn7n.js +4 -0
  106. package/dist/src/chunk-s1zq65ny.js +4 -0
  107. package/dist/src/chunk-s73qn3fx.js +4 -0
  108. package/dist/src/chunk-sjn0nj4p.js +5 -0
  109. package/dist/src/chunk-sns0c35v.js +7 -0
  110. package/dist/src/chunk-stfzjr9y.js +8 -0
  111. package/dist/src/chunk-sz1a7p43.js +4 -0
  112. package/dist/src/chunk-t4dr5c8v.js +8 -0
  113. package/dist/src/chunk-tc8k9c1j.js +4 -0
  114. package/dist/src/chunk-teznhase.js +4 -0
  115. package/dist/src/chunk-ty9xgmz4.js +4 -0
  116. package/dist/src/chunk-tyazf3sk.js +145 -0
  117. package/dist/src/chunk-v6npjrjm.js +5 -0
  118. package/dist/src/chunk-v90es00d.js +4 -0
  119. package/dist/src/chunk-vbvtzkwz.js +5 -0
  120. package/dist/src/chunk-vefd8qee.js +8 -0
  121. package/dist/src/chunk-vs9r72ta.js +17 -0
  122. package/dist/src/chunk-w2mwa0jk.js +4 -0
  123. package/dist/src/chunk-w7zsh13a.js +9 -0
  124. package/dist/src/chunk-w88k0bgr.js +4 -0
  125. package/dist/src/chunk-wry6skrm.js +4 -0
  126. package/dist/src/chunk-wzdt0enk.js +4 -0
  127. package/dist/src/chunk-xhhv854c.js +4 -0
  128. package/dist/src/chunk-y58270hd.js +4 -0
  129. package/dist/src/chunk-yk0hmbex.js +4 -0
  130. package/dist/src/chunk-ympy4fdz.js +28 -0
  131. package/dist/src/chunk-yw436axy.js +4 -0
  132. package/dist/src/chunk-z04jrpjy.js +5 -0
  133. package/dist/src/chunk-z2xznczw.js +4 -0
  134. package/dist/src/chunk-z4xnrgps.js +4 -0
  135. package/dist/src/chunk-z7csyszv.js +4 -0
  136. package/dist/src/chunk-z8t0v07j.js +11 -0
  137. package/dist/src/chunk-z916af47.js +228 -0
  138. package/dist/src/chunk-zcr8he8q.js +5 -0
  139. package/dist/src/chunk-zd9vmkzn.js +9 -0
  140. package/dist/src/chunk-zg67wjkh.js +5 -0
  141. package/dist/src/chunk-zj939v0h.js +5 -0
  142. package/dist/src/chunk-zkdjwtc1.js +4 -0
  143. package/dist/src/chunk-zkv5kzt6.js +4 -0
  144. package/dist/src/daemon/processEntry.js +4 -0
  145. package/dist/src/index.js +4 -2843
  146. package/dist/src/runtime/bunRuntimeGuard.js +4 -0
  147. package/dist/src/utils/workers/iosBundleExtractWorker.js +2 -3
  148. package/package.json +5 -5
  149. package/schemas/README.md +16 -0
  150. package/schemas/prototype-icon-names.json +302 -0
  151. package/node_modules/@borewit/text-codec/README.md +0 -87
  152. package/node_modules/@jimp/diff/node_modules/pixelmatch/README.md +0 -110
  153. package/node_modules/@jimp/diff/node_modules/pixelmatch/node_modules/pngjs/README.md +0 -433
  154. package/node_modules/@jimp/file-ops/dist/browser/index.js +0 -8
  155. package/node_modules/@jimp/js-png/README.md +0 -35
  156. package/node_modules/@jimp/js-png/src/__image_snapshots__/index-node-test-ts-png-should-use-png-options-1-snap.png +0 -0
  157. package/node_modules/@jimp/js-png/src/output.png +0 -0
  158. package/node_modules/@jimp/js-png/vitest.config.browser.mjs +0 -3
  159. package/node_modules/@jimp/plugin-resize/README.md +0 -12
  160. package/node_modules/@jimp/plugin-resize/vitest.config.browser.mjs +0 -3
  161. package/node_modules/@tokenizer/inflate/README.md +0 -114
  162. package/node_modules/@tokenizer/token/README.md +0 -19
  163. package/node_modules/await-to-js/README.md +0 -82
  164. package/node_modules/debug/README.md +0 -481
  165. package/node_modules/exif-parser/README.md +0 -83
  166. package/node_modules/file-type/readme.md +0 -667
  167. package/node_modules/ieee754/README.md +0 -51
  168. package/node_modules/mime/README.md +0 -178
  169. package/node_modules/ms/readme.md +0 -59
  170. package/node_modules/parse-bmfont-xml/README.md +0 -74
  171. package/node_modules/parse-bmfont-xml/lib/browser.js +0 -85
  172. package/node_modules/parse-bmfont-xml/node_modules/xml2js/README.md +0 -507
  173. package/node_modules/pngjs/README.md +0 -287
  174. package/node_modules/sax/README.md +0 -228
  175. package/node_modules/strtok3/README.md +0 -795
  176. package/node_modules/tinycolor2/README.md +0 -492
  177. package/node_modules/tinycolor2/cjs/test.js +0 -2191
  178. package/node_modules/tinycolor2/cjs/test_template.js +0 -26
  179. package/node_modules/tinycolor2/deno_asserts@0.168.0.mjs +0 -807
  180. package/node_modules/tinycolor2/esm/test.js +0 -2189
  181. package/node_modules/tinycolor2/esm/test_template.js +0 -24
  182. package/node_modules/tinycolor2/tinycolor.js +0 -1191
  183. package/node_modules/token-types/README.md +0 -160
  184. package/node_modules/uint8array-extras/readme.md +0 -318
  185. package/node_modules/xml-parse-from-string/README.md +0 -35
  186. package/node_modules/xmlbuilder/README.md +0 -86
  187. package/node_modules/zod/README.md +0 -208
  188. package/node_modules/zod/v4/locales/ar.d.cts +0 -4
  189. package/node_modules/zod/v4/locales/ar.d.ts +0 -4
  190. package/node_modules/zod/v4/locales/az.d.cts +0 -4
  191. package/node_modules/zod/v4/locales/az.d.ts +0 -4
  192. package/node_modules/zod/v4/locales/be.d.cts +0 -4
  193. package/node_modules/zod/v4/locales/be.d.ts +0 -4
  194. package/node_modules/zod/v4/locales/ca.d.cts +0 -4
  195. package/node_modules/zod/v4/locales/ca.d.ts +0 -4
  196. package/node_modules/zod/v4/locales/cs.d.cts +0 -4
  197. package/node_modules/zod/v4/locales/cs.d.ts +0 -4
  198. package/node_modules/zod/v4/locales/de.d.cts +0 -4
  199. package/node_modules/zod/v4/locales/de.d.ts +0 -4
  200. package/node_modules/zod/v4/locales/en.d.cts +0 -5
  201. package/node_modules/zod/v4/locales/en.d.ts +0 -5
  202. package/node_modules/zod/v4/locales/eo.d.cts +0 -5
  203. package/node_modules/zod/v4/locales/eo.d.ts +0 -5
  204. package/node_modules/zod/v4/locales/es.d.cts +0 -4
  205. package/node_modules/zod/v4/locales/es.d.ts +0 -4
  206. package/node_modules/zod/v4/locales/fa.d.cts +0 -4
  207. package/node_modules/zod/v4/locales/fa.d.ts +0 -4
  208. package/node_modules/zod/v4/locales/fi.d.cts +0 -4
  209. package/node_modules/zod/v4/locales/fi.d.ts +0 -4
  210. package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -4
  211. package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
  212. package/node_modules/zod/v4/locales/fr.d.cts +0 -4
  213. package/node_modules/zod/v4/locales/fr.d.ts +0 -4
  214. package/node_modules/zod/v4/locales/he.d.cts +0 -4
  215. package/node_modules/zod/v4/locales/he.d.ts +0 -4
  216. package/node_modules/zod/v4/locales/hu.d.cts +0 -4
  217. package/node_modules/zod/v4/locales/hu.d.ts +0 -4
  218. package/node_modules/zod/v4/locales/id.d.cts +0 -4
  219. package/node_modules/zod/v4/locales/id.d.ts +0 -4
  220. package/node_modules/zod/v4/locales/index.d.cts +0 -39
  221. package/node_modules/zod/v4/locales/index.d.ts +0 -39
  222. package/node_modules/zod/v4/locales/it.d.cts +0 -4
  223. package/node_modules/zod/v4/locales/it.d.ts +0 -4
  224. package/node_modules/zod/v4/locales/ja.d.cts +0 -4
  225. package/node_modules/zod/v4/locales/ja.d.ts +0 -4
  226. package/node_modules/zod/v4/locales/kh.d.cts +0 -4
  227. package/node_modules/zod/v4/locales/kh.d.ts +0 -4
  228. package/node_modules/zod/v4/locales/ko.d.cts +0 -4
  229. package/node_modules/zod/v4/locales/ko.d.ts +0 -4
  230. package/node_modules/zod/v4/locales/mk.d.cts +0 -4
  231. package/node_modules/zod/v4/locales/mk.d.ts +0 -4
  232. package/node_modules/zod/v4/locales/ms.d.cts +0 -4
  233. package/node_modules/zod/v4/locales/ms.d.ts +0 -4
  234. package/node_modules/zod/v4/locales/nl.d.cts +0 -4
  235. package/node_modules/zod/v4/locales/nl.d.ts +0 -4
  236. package/node_modules/zod/v4/locales/no.d.cts +0 -4
  237. package/node_modules/zod/v4/locales/no.d.ts +0 -4
  238. package/node_modules/zod/v4/locales/ota.d.cts +0 -4
  239. package/node_modules/zod/v4/locales/ota.d.ts +0 -4
  240. package/node_modules/zod/v4/locales/pl.d.cts +0 -4
  241. package/node_modules/zod/v4/locales/pl.d.ts +0 -4
  242. package/node_modules/zod/v4/locales/ps.d.cts +0 -4
  243. package/node_modules/zod/v4/locales/ps.d.ts +0 -4
  244. package/node_modules/zod/v4/locales/pt.d.cts +0 -4
  245. package/node_modules/zod/v4/locales/pt.d.ts +0 -4
  246. package/node_modules/zod/v4/locales/ru.d.cts +0 -4
  247. package/node_modules/zod/v4/locales/ru.d.ts +0 -4
  248. package/node_modules/zod/v4/locales/sl.d.cts +0 -4
  249. package/node_modules/zod/v4/locales/sl.d.ts +0 -4
  250. package/node_modules/zod/v4/locales/sv.d.cts +0 -4
  251. package/node_modules/zod/v4/locales/sv.d.ts +0 -4
  252. package/node_modules/zod/v4/locales/ta.d.cts +0 -4
  253. package/node_modules/zod/v4/locales/ta.d.ts +0 -4
  254. package/node_modules/zod/v4/locales/th.d.cts +0 -4
  255. package/node_modules/zod/v4/locales/th.d.ts +0 -4
  256. package/node_modules/zod/v4/locales/tr.d.cts +0 -5
  257. package/node_modules/zod/v4/locales/tr.d.ts +0 -5
  258. package/node_modules/zod/v4/locales/ua.d.cts +0 -4
  259. package/node_modules/zod/v4/locales/ua.d.ts +0 -4
  260. package/node_modules/zod/v4/locales/ur.d.cts +0 -4
  261. package/node_modules/zod/v4/locales/ur.d.ts +0 -4
  262. package/node_modules/zod/v4/locales/vi.d.cts +0 -4
  263. package/node_modules/zod/v4/locales/vi.d.ts +0 -4
  264. package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -4
  265. package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
  266. package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -4
  267. package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
@@ -1,160 +0,0 @@
1
- [![Node.js CI](https://github.com/Borewit/token-types/actions/workflows/nodejs-ci.yml/badge.svg?branch=master)](https://github.com/Borewit/token-types/actions/workflows/nodejs-ci.yml?query=branch%3Amaster)
2
- [![NPM version](https://badge.fury.io/js/token-types.svg)](https://npmjs.org/package/token-types)
3
- [![npm downloads](http://img.shields.io/npm/dm/token-types.svg)](https://npmcharts.com/compare/token-types,strtok3?start=1200&interval=30)
4
- [![codecov](https://codecov.io/gh/Borewit/token-types/branch/master/graph/badge.svg)](https://codecov.io/gh/Borewit/token-types)
5
- [![DeepScan grade](https://deepscan.io/api/teams/5165/projects/6940/branches/61852/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=5165&pid=6940&bid=61852)
6
- [![Known Vulnerabilities](https://snyk.io/test/github/Borewit/token-types/badge.svg?targetFile=package.json)](https://snyk.io/test/github/Borewit/token-types?targetFile=package.json)
7
-
8
- # token-types
9
-
10
- A primitive token library used to read and write from a `Uint8Array`.
11
- Although it is possible to use this module directly, it is primarily designed to be used with [strtok3 tokenizer](https://github.com/Borewit/strtok3).
12
-
13
- ## Compatibility
14
-
15
- Module: version 5 migrated from [CommonJS](https://en.wikipedia.org/wiki/CommonJS) to [pure ECMAScript Module (ESM)](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
16
- JavaScript is compliant with [ECMAScript 2019 (ES10)](https://en.wikipedia.org/wiki/ECMAScript#10th_Edition_%E2%80%93_ECMAScript_2019).
17
-
18
- Node.js 18 is supported for running the published package; it is not a supported
19
- build environment. The test toolchain requires Node.js 22.12 or later. CI builds
20
- on Node.js 24 and runs the tests on Node.js 22, 24 and 26.
21
-
22
- ## Development
23
-
24
- Use Node.js 24 and the Yarn version pinned in `package.json` to install development
25
- dependencies and build from source:
26
-
27
- ```sh
28
- corepack enable
29
- yarn install --immutable
30
- yarn test
31
- ```
32
-
33
- `yarn test` type-checks the sources and runs the Vitest suite against the
34
- TypeScript sources. `yarn test:watch` runs Vitest in watch mode, and
35
- `yarn test-coverage` writes text and LCOV reports to `coverage`. `yarn clean`
36
- removes `dist` and coverage.
37
-
38
- `yarn lint` checks the Markdown and Biome rules. `yarn format:check` verifies
39
- Biome formatting, and `yarn fix` applies formatting, import organization and
40
- safe lint fixes.
41
-
42
- ## Installation
43
-
44
- ```sh
45
- npm install --save token-types
46
- ```
47
- Usually in combination with [strtok3](https://github.com/Borewit/strtok3):
48
- ```sh
49
- npm install --save strtok3
50
- ```
51
-
52
- Using TypeScript you should also install [@tokenizer/token](https://github.com/Borewit/tokenizer-token) as a development
53
- dependency:
54
-
55
- ```shell
56
- npm install --save-dev @tokenizer/token
57
- ```
58
-
59
-
60
- ## Example
61
-
62
- ```js
63
- import * as strtok3 from 'strtok3';
64
- import * as token from 'token-types';
65
-
66
- (async () => {
67
-
68
- const tokenizer = await strtok3.fromFile("somefile.bin");
69
- try {
70
- const myNumber = await tokenizer.readToken(token.Float32_BE);
71
- console.log(`My number: ${myNumber}`);
72
- } finally {
73
- tokenizer.close(); // Close the file
74
- }
75
- })();
76
- ```
77
-
78
- ## Tokens
79
-
80
- ### Numeric tokens
81
-
82
- `token-types` supports a wide variety of numeric tokens out of the box:
83
-
84
- | Token | Number | Bits | Endianness |
85
- |---------------|------------------|------|----------------|
86
- | `UINT8` | Unsigned integer | 8 | n/a |
87
- | `UINT16_BE` | Unsigned integer | 16 | big endian |
88
- | `UINT16_LE` | Unsigned integer | 16 | little endian |
89
- | `UINT24_BE` | Unsigned integer | 24 | big endian |
90
- | `UINT24_LE` | Unsigned integer | 24 | little endian |
91
- | `UINT32_BE` | Unsigned integer | 32 | big endian |
92
- | `UINT32_LE` | Unsigned integer | 32 | little endian |
93
- | `UINT64_BE` | Unsigned integer | 64 | big endian |
94
- | `UINT64_LE`* | Unsigned integer | 64 | little endian |
95
- | `INT8` | Signed integer | 8 | n/a |
96
- | `INT16_BE` | Signed integer | 16 | big endian |
97
- | `INT16_LE` | Signed integer | 16 | little endian |
98
- | `INT24_BE` | Signed integer | 24 | big endian |
99
- | `INT24_LE` | Signed integer | 24 | little endian |
100
- | `INT32_BE` | Signed integer | 32 | big endian |
101
- | `INT32_LE` | Signed integer | 32 | little endian |
102
- | `INT64_BE` | Signed integer | 64 | big endian |
103
- | `INT64_LE`* | Signed integer | 64 | little endian |
104
- | `Float16_BE` | IEEE 754 float | 16 | big endian |
105
- | `Float16_LE` | IEEE 754 float | 16 | little endian |
106
- | `Float32_BE` | IEEE 754 float | 32 | big endian |
107
- | `Float32_LE` | IEEE 754 float | 32 | little endian |
108
- | `Float64_BE` | IEEE 754 float | 64 | big endian |
109
- | `Float64_LE` | IEEE 754 float | 64 | little endian |
110
- | `Float80_BE`* | IEEE 754 float | 80 | big endian |
111
- | `Float80_LE`* | IEEE 754 float | 80 | little endian |
112
-
113
- (*) The tokens exceed the JavaScript IEEE 754 64-bit Floating Point precision, decoding and encoding is best effort based.
114
-
115
- ### String and byte tokens
116
-
117
- `StringType` decoding is using [@borewit/text-codec](https://github.com/Borewit/text-codec).
118
-
119
- `StringType` and `Uint8ArrayType` implement `IToken`, so the same fixed-size
120
- token can decode and encode:
121
-
122
- ```js
123
- import { StringType, Uint8ArrayType } from 'token-types';
124
-
125
- const ascii = new StringType(4, 'ascii');
126
- const buffer = new Uint8Array(8);
127
- ascii.put(buffer, 0, 'fLaC');
128
-
129
- const bytes = new Uint8ArrayType(4);
130
- bytes.put(buffer, 4, Uint8Array.from([1, 2, 3, 4]));
131
- ```
132
-
133
- `put` rejects values whose byte length differs from `len`, so a fixed-size
134
- field is never silently truncated or padded.
135
-
136
- ### Custom tokens
137
-
138
- Custom tokens can be added, suitable for reading binary files or network messages:
139
- ```js
140
- ExtendedHeader = {
141
- len: 10,
142
-
143
- get: (buf, off) => {
144
- return {
145
- // Extended header size
146
- size: Token.UINT32_BE.get(buf, off),
147
- // Extended Flags
148
- extendedFlags: Token.UINT16_BE.get(buf, off + 4),
149
- // Size of padding
150
- sizeOfPadding: Token.UINT32_BE.get(buf, off + 6),
151
- // CRC data present
152
- crcDataPresent: common.strtokBITSET.get(buf, off + 4, 31)
153
- };
154
- }
155
- };
156
- ```
157
-
158
- ## Licence
159
-
160
- This project is licensed under the [MIT License](LICENSE.txt). Feel free to use, modify, and distribute as needed.
@@ -1,318 +0,0 @@
1
- # uint8array-extras
2
-
3
- > Useful utilities for working with [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) (and [`Buffer`](https://nodejs.org/api/buffer.html))
4
-
5
- It's time to [transition from `Buffer` to `Uint8Array`](https://sindresorhus.com/blog/goodbye-nodejs-buffer), and this package helps fill in the gaps.
6
-
7
- Note that `Buffer` is a `Uint8Array` subclass, so you can use this package with `Buffer` too.
8
-
9
- This package is tree-shakeable and browser-compatible.
10
-
11
- This package also includes methods to convert a string to Base64 and back.
12
-
13
- Note: In the browser, do not use [`globalThis.atob()`](https://developer.mozilla.org/en-US/docs/Web/API/atob) / [`globalThis.btoa()`](https://developer.mozilla.org/en-US/docs/Web/API/btoa) because they [do not support Unicode](https://developer.mozilla.org/en-US/docs/Glossary/Base64#the_unicode_problem). This package does.
14
-
15
- ## Install
16
-
17
- ```sh
18
- npm install uint8array-extras
19
- ```
20
-
21
- ## Usage
22
-
23
- ```js
24
- import {concatUint8Arrays} from 'uint8array-extras';
25
-
26
- const a = new Uint8Array([1, 2, 3]);
27
- const b = new Uint8Array([4, 5, 6]);
28
-
29
- console.log(concatUint8Arrays([a, b]));
30
- //=> Uint8Array [1, 2, 3, 4, 5, 6]
31
- ```
32
-
33
- ## API
34
-
35
- ### `isUint8Array(value: unknown): boolean`
36
-
37
- Check if the given value is an instance of `Uint8Array`.
38
-
39
- Replacement for [`Buffer.isBuffer()`](https://nodejs.org/api/buffer.html#static-method-bufferisbufferobj).
40
-
41
- ```js
42
- import {isUint8Array} from 'uint8array-extras';
43
-
44
- console.log(isUint8Array(new Uint8Array()));
45
- //=> true
46
-
47
- console.log(isUint8Array(Buffer.from('x')));
48
- //=> true
49
-
50
- console.log(isUint8Array(new ArrayBuffer(10)));
51
- //=> false
52
- ```
53
-
54
- ### `assertUint8Array(value: unknown)`
55
-
56
- Throw a `TypeError` if the given value is not an instance of `Uint8Array`.
57
-
58
- ```js
59
- import {assertUint8Array} from 'uint8array-extras';
60
-
61
- try {
62
- assertUint8Array(new ArrayBuffer(10)); // Throws a TypeError
63
- } catch (error) {
64
- console.error(error.message);
65
- }
66
- ```
67
-
68
- ### `assertUint8ArrayOrArrayBuffer(value: unknown)`
69
-
70
- Throw a `TypeError` if the given value is not an instance of `Uint8Array` or `ArrayBuffer`.
71
-
72
- Useful as a guard for functions that accept either a `Uint8Array` or `ArrayBuffer`.
73
-
74
- ```js
75
- import {assertUint8ArrayOrArrayBuffer} from 'uint8array-extras';
76
-
77
- assertUint8ArrayOrArrayBuffer(new Uint8Array());
78
- assertUint8ArrayOrArrayBuffer(new ArrayBuffer(8));
79
- ```
80
-
81
- ### `toUint8Array(value: TypedArray | ArrayBuffer | DataView): Uint8Array`
82
-
83
- Convert a value to a `Uint8Array` without copying its data.
84
-
85
- This can be useful for converting a `Buffer` to a pure `Uint8Array`. `Buffer` is already a `Uint8Array` subclass, but [`Buffer` alters some behavior](https://sindresorhus.com/blog/goodbye-nodejs-buffer), so it can be useful to cast it to a pure `Uint8Array` before returning it.
86
-
87
- Tip: If you want a copy, just call `.slice()` on the return value.
88
-
89
- ### `concatUint8Arrays(arrays: Array<Uint8Array | ArrayBuffer>, totalLength?: number): Uint8Array`
90
-
91
- Concatenate the given arrays into a new array.
92
-
93
- If `arrays` is empty, it will return a zero-sized `Uint8Array`.
94
-
95
- If `totalLength` is not specified, it is calculated from summing the lengths of the given arrays.
96
-
97
- Replacement for [`Buffer.concat()`](https://nodejs.org/api/buffer.html#static-method-bufferconcatlist-totallength).
98
-
99
- ```js
100
- import {concatUint8Arrays} from 'uint8array-extras';
101
-
102
- const a = new Uint8Array([1, 2, 3]);
103
- const b = new Uint8Array([4, 5, 6]);
104
-
105
- console.log(concatUint8Arrays([a, b]));
106
- //=> Uint8Array [1, 2, 3, 4, 5, 6]
107
- ```
108
-
109
- ### `areUint8ArraysEqual(a: Uint8Array | ArrayBuffer, b: Uint8Array | ArrayBuffer): boolean`
110
-
111
- Check if two arrays are identical by verifying that they contain the same bytes in the same sequence.
112
-
113
- Replacement for [`Buffer#equals()`](https://nodejs.org/api/buffer.html#bufequalsotherbuffer).
114
-
115
- ```js
116
- import {areUint8ArraysEqual} from 'uint8array-extras';
117
-
118
- const a = new Uint8Array([1, 2, 3]);
119
- const b = new Uint8Array([1, 2, 3]);
120
- const c = new Uint8Array([4, 5, 6]);
121
-
122
- console.log(areUint8ArraysEqual(a, b));
123
- //=> true
124
-
125
- console.log(areUint8ArraysEqual(a, c));
126
- //=> false
127
- ```
128
-
129
- ### `compareUint8Arrays(a: Uint8Array | ArrayBuffer, b: Uint8Array | ArrayBuffer): 0 | 1 | -1`
130
-
131
- Compare two arrays and indicate their relative order or equality. Useful for sorting.
132
-
133
- Replacement for [`Buffer.compare()`](https://nodejs.org/api/buffer.html#static-method-buffercomparebuf1-buf2).
134
-
135
- ```js
136
- import {compareUint8Arrays} from 'uint8array-extras';
137
-
138
- const array1 = new Uint8Array([1, 2, 3]);
139
- const array2 = new Uint8Array([4, 5, 6]);
140
- const array3 = new Uint8Array([7, 8, 9]);
141
-
142
- [array3, array1, array2].sort(compareUint8Arrays);
143
- //=> [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
144
- ```
145
-
146
- ### `uint8ArrayToString(array: Uint8Array | ArrayBuffer, encoding?: string = 'utf8'): string`
147
-
148
- Convert a `Uint8Array` to a string.
149
-
150
- - Parameter: `encoding` - The [encoding](https://developer.mozilla.org/en-US/docs/Web/API/Encoding_API/Encodings) to convert from.
151
-
152
- Replacement for [`Buffer#toString()`](https://nodejs.org/api/buffer.html#buftostringencoding-start-end). For the `encoding` parameter, `latin1` should be used instead of `binary` and `utf-16le` instead of `utf16le`.
153
-
154
- ```js
155
- import {uint8ArrayToString} from 'uint8array-extras';
156
-
157
- const byteArray = new Uint8Array([72, 101, 108, 108, 111]);
158
- console.log(uint8ArrayToString(byteArray));
159
- //=> 'Hello'
160
-
161
- const zh = new Uint8Array([167, 65, 166, 110]);
162
- console.log(uint8ArrayToString(zh, 'big5'));
163
- //=> '你好'
164
-
165
- const ja = new Uint8Array([130, 177, 130, 241, 130, 201, 130, 191, 130, 205]);
166
- console.log(uint8ArrayToString(ja, 'shift-jis'));
167
- //=> 'こんにちは'
168
- ```
169
-
170
- ### `stringToUint8Array(string: string): Uint8Array`
171
-
172
- Convert a string to a `Uint8Array` (using UTF-8 encoding).
173
-
174
- Replacement for [`Buffer.from('Hello')`](https://nodejs.org/api/buffer.html#static-method-bufferfromstring-encoding).
175
-
176
- ```js
177
- import {stringToUint8Array} from 'uint8array-extras';
178
-
179
- console.log(stringToUint8Array('Hello'));
180
- //=> Uint8Array [72, 101, 108, 108, 111]
181
- ```
182
-
183
- ### `uint8ArrayToBase64(array: Uint8Array | ArrayBuffer, options?: {urlSafe: boolean}): string`
184
-
185
- Convert a `Uint8Array` to a Base64-encoded string.
186
-
187
- Specify `{urlSafe: true}` to get a [Base64URL](https://base64.guru/standards/base64url)-encoded string.
188
-
189
- Replacement for [`Buffer#toString('base64')`](https://nodejs.org/api/buffer.html#buftostringencoding-start-end).
190
-
191
- ```js
192
- import {uint8ArrayToBase64} from 'uint8array-extras';
193
-
194
- const byteArray = new Uint8Array([72, 101, 108, 108, 111]);
195
-
196
- console.log(uint8ArrayToBase64(byteArray));
197
- //=> 'SGVsbG8='
198
- ```
199
-
200
- ### `base64ToUint8Array(string: string): Uint8Array`
201
-
202
- Convert a Base64-encoded or [Base64URL](https://base64.guru/standards/base64url)-encoded string to a `Uint8Array`.
203
-
204
- Accepts Base64URL with or without padding.
205
-
206
- Replacement for [`Buffer.from('SGVsbG8=', 'base64')`](https://nodejs.org/api/buffer.html#static-method-bufferfromstring-encoding).
207
-
208
- ```js
209
- import {base64ToUint8Array} from 'uint8array-extras';
210
-
211
- console.log(base64ToUint8Array('SGVsbG8='));
212
- //=> Uint8Array [72, 101, 108, 108, 111]
213
- ```
214
-
215
- ### `stringToBase64(string: string, options?: {urlSafe: boolean}): string`
216
-
217
- Encode a string to a Base64-encoded string.
218
-
219
- Specify `{urlSafe: true}` to get a [Base64URL](https://base64.guru/standards/base64url)-encoded string.
220
-
221
- Replacement for `Buffer.from('Hello').toString('base64')` and [`btoa()`](https://developer.mozilla.org/en-US/docs/Web/API/btoa).
222
-
223
- ```js
224
- import {stringToBase64} from 'uint8array-extras';
225
-
226
- console.log(stringToBase64('Hello'));
227
- //=> 'SGVsbG8='
228
- ```
229
-
230
- ### `base64ToString(base64String: string): string`
231
-
232
- Decode a Base64-encoded or [Base64URL](https://base64.guru/standards/base64url)-encoded string to a string.
233
-
234
- Accepts Base64URL with or without padding.
235
-
236
- Replacement for `Buffer.from('SGVsbG8=', 'base64').toString()` and [`atob()`](https://developer.mozilla.org/en-US/docs/Web/API/atob).
237
-
238
- ```js
239
- import {base64ToString} from 'uint8array-extras';
240
-
241
- console.log(base64ToString('SGVsbG8='));
242
- //=> 'Hello'
243
- ```
244
-
245
- ### `uint8ArrayToHex(array: Uint8Array | ArrayBuffer): string`
246
-
247
- Convert a `Uint8Array` to a Hex string.
248
-
249
- Replacement for [`Buffer#toString('hex')`](https://nodejs.org/api/buffer.html#buftostringencoding-start-end).
250
-
251
- ```js
252
- import {uint8ArrayToHex} from 'uint8array-extras';
253
-
254
- const byteArray = new Uint8Array([72, 101, 108, 108, 111]);
255
-
256
- console.log(uint8ArrayToHex(byteArray));
257
- //=> '48656c6c6f'
258
- ```
259
-
260
- ### `hexToUint8Array(hexString: string): Uint8Array`
261
-
262
- Convert a Hex string to a `Uint8Array`.
263
-
264
- Replacement for [`Buffer.from('48656c6c6f', 'hex')`](https://nodejs.org/api/buffer.html#static-method-bufferfromstring-encoding).
265
-
266
- ```js
267
- import {hexToUint8Array} from 'uint8array-extras';
268
-
269
- console.log(hexToUint8Array('48656c6c6f'));
270
- //=> Uint8Array [72, 101, 108, 108, 111]
271
- ```
272
-
273
- ### `getUintBE(view: DataView): number`
274
-
275
- Read `DataView#byteLength` number of bytes from the given view, up to 48-bit.
276
-
277
- Replacement for [`Buffer#readUIntBE`](https://nodejs.org/api/buffer.html#bufreaduintbeoffset-bytelength)
278
-
279
- ```js
280
- import {getUintBE} from 'uint8array-extras';
281
-
282
- const byteArray = new Uint8Array([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
283
-
284
- console.log(getUintBE(new DataView(byteArray.buffer)));
285
- //=> 20015998341291
286
- ```
287
-
288
- ### `indexOf(array: Uint8Array | ArrayBuffer, value: Uint8Array | ArrayBuffer): number`
289
-
290
- Find the index of the first occurrence of the given sequence of bytes (`value`) within the given `Uint8Array` (`array`).
291
-
292
- Replacement for [`Buffer#indexOf`](https://nodejs.org/api/buffer.html#bufindexofvalue-byteoffset-encoding). `Uint8Array#indexOf` only takes a number which is different from Buffer's `indexOf` implementation.
293
-
294
- ```js
295
- import {indexOf} from 'uint8array-extras';
296
-
297
- const byteArray = new Uint8Array([0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef]);
298
-
299
- console.log(indexOf(byteArray, new Uint8Array([0x78, 0x90])));
300
- //=> 3
301
- ```
302
-
303
- ### `includes(array: Uint8Array | ArrayBuffer, value: Uint8Array | ArrayBuffer): boolean`
304
-
305
- Checks if the given sequence of bytes (`value`) is within the given `Uint8Array` (`array`).
306
-
307
- Returns true if the value is included, otherwise false.
308
-
309
- Replacement for [`Buffer#includes`](https://nodejs.org/api/buffer.html#bufincludesvalue-byteoffset-encoding). `Uint8Array#includes` only takes a number which is different from Buffer's `includes` implementation.
310
-
311
- ```js
312
- import {includes} from 'uint8array-extras';
313
-
314
- const byteArray = new Uint8Array([0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef]);
315
-
316
- console.log(includes(byteArray, new Uint8Array([0x78, 0x90])));
317
- //=> true
318
- ```
@@ -1,35 +0,0 @@
1
- # xml-parse-from-string
2
-
3
- [![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)
4
-
5
- A light browser wrapper around `DOMParser.parseFromString` for XML, with fallback for IE8 and other browsers.
6
-
7
- - attempts to use DOMParser with `"application/xml"`
8
- - falls back to `ActiveXObject('Microsoft.XMLDOM')`
9
- - then falls back to `createElement` / `innerHTML`
10
-
11
- ```js
12
- var parseXML = require('xml-parse-from-string')
13
-
14
- var str = '<root><foobar id="blah"></foobar></root>'
15
- var doc = parseXML(str)
16
- var tag = doc.getElementsByTagName('foobar')[0]
17
-
18
- console.log(tag.getAttribute('id')) // -> "blah"
19
- ```
20
-
21
- Be wary of subtle differences between implementations, such as case-sensitivity in `attribute.nodeName`.
22
-
23
- PRs for Node version welcome.
24
-
25
- ## Usage
26
-
27
- [![NPM](https://nodei.co/npm/xml-parse-from-string.png)](https://www.npmjs.com/package/xml-parse-from-string)
28
-
29
- #### `root = parse(str)`
30
-
31
- Parses the string as XML and returns the `root` element as a DOM element, so you can do operations similar to `document.getElementById`, `document.getElementsByTagName`, and so forth.
32
-
33
- ## License
34
-
35
- MIT, see [LICENSE.md](http://github.com/Jam3/xml-parse-from-string/blob/master/LICENSE.md) for details.
@@ -1,86 +0,0 @@
1
- # xmlbuilder-js
2
-
3
- An XML builder for [node.js](https://nodejs.org/) similar to
4
- [java-xmlbuilder](https://github.com/jmurty/java-xmlbuilder).
5
-
6
- [![License](http://img.shields.io/npm/l/xmlbuilder.svg?style=flat-square)](http://opensource.org/licenses/MIT)
7
- [![NPM Version](http://img.shields.io/npm/v/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder)
8
- [![NPM Downloads](https://img.shields.io/npm/dm/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder)
9
-
10
- [![Travis Build Status](http://img.shields.io/travis/oozcitak/xmlbuilder-js.svg?style=flat-square)](http://travis-ci.org/oozcitak/xmlbuilder-js)
11
- [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/bf7odb20hj77isry?svg=true)](https://ci.appveyor.com/project/oozcitak/xmlbuilder-js)
12
- [![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://david-dm.org/oozcitak/xmlbuilder-js)
13
- [![Code Coverage](https://img.shields.io/coveralls/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://coveralls.io/github/oozcitak/xmlbuilder-js)
14
-
15
- ### Installation:
16
-
17
- ``` sh
18
- npm install xmlbuilder
19
- ```
20
-
21
- ### Usage:
22
-
23
- ``` js
24
- var builder = require('xmlbuilder');
25
- var xml = builder.create('root')
26
- .ele('xmlbuilder')
27
- .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git')
28
- .end({ pretty: true});
29
-
30
- console.log(xml);
31
- ```
32
-
33
- will result in:
34
-
35
- ``` xml
36
- <?xml version="1.0"?>
37
- <root>
38
- <xmlbuilder>
39
- <repo type="git">git://github.com/oozcitak/xmlbuilder-js.git</repo>
40
- </xmlbuilder>
41
- </root>
42
- ```
43
-
44
- It is also possible to convert objects into nodes:
45
-
46
- ``` js
47
- builder.create({
48
- root: {
49
- xmlbuilder: {
50
- repo: {
51
- '@type': 'git', // attributes start with @
52
- '#text': 'git://github.com/oozcitak/xmlbuilder-js.git' // text node
53
- }
54
- }
55
- }
56
- });
57
- ```
58
-
59
- If you need to do some processing:
60
-
61
- ``` js
62
- var root = builder.create('squares');
63
- root.com('f(x) = x^2');
64
- for(var i = 1; i <= 5; i++)
65
- {
66
- var item = root.ele('data');
67
- item.att('x', i);
68
- item.att('y', i * i);
69
- }
70
- ```
71
-
72
- This will result in:
73
-
74
- ``` xml
75
- <?xml version="1.0"?>
76
- <squares>
77
- <!-- f(x) = x^2 -->
78
- <data x="1" y="1"/>
79
- <data x="2" y="4"/>
80
- <data x="3" y="9"/>
81
- <data x="4" y="16"/>
82
- <data x="5" y="25"/>
83
- </squares>
84
- ```
85
-
86
- See the [wiki](https://github.com/oozcitak/xmlbuilder-js/wiki) for details and [examples](https://github.com/oozcitak/xmlbuilder-js/wiki/Examples) for more complex examples.