@kaeawc/auto-mobile 0.0.90 → 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.
- package/README.md +7 -0
- package/README.md.backup +7 -0
- package/dist/build-info.json +12 -11
- package/dist/schemas/README.md +16 -0
- package/dist/schemas/prototype-icon-names.json +302 -0
- package/dist/schemas/prototype-platform-permissions.json +75 -0
- package/dist/schemas/test-plan.schema.json +2 -2
- package/dist/src/chunk-09442h7v.js +4 -0
- package/dist/src/chunk-0dfnyfkh.js +5 -0
- package/dist/src/chunk-0e4gm1kj.js +5 -0
- package/dist/src/chunk-0eb8576f.js +4 -0
- package/dist/src/chunk-0rjm4nx7.js +5 -0
- package/dist/src/chunk-0w1spptt.js +6 -0
- package/dist/src/chunk-1zmh2eak.js +4 -0
- package/dist/src/chunk-28k63ha3.js +5 -0
- package/dist/src/chunk-2d4wmp8b.js +4 -0
- package/dist/src/chunk-2e6s75qv.js +78 -0
- package/dist/src/chunk-2v7tw1nj.js +5 -0
- package/dist/src/chunk-32jpxz2y.js +323 -0
- package/dist/src/chunk-34zxqcmq.js +5 -0
- package/dist/src/chunk-3jmvqygr.js +238 -0
- package/dist/src/chunk-3swvfhqt.js +5 -0
- package/dist/src/chunk-44bt78m9.js +5 -0
- package/dist/src/chunk-488vt2bp.js +4 -0
- package/dist/src/chunk-4fgdhcwx.js +5 -0
- package/dist/src/chunk-4jp2se4w.js +4 -0
- package/dist/src/chunk-4pfftt07.js +5 -0
- package/dist/src/chunk-4vhr9e4t.js +4 -0
- package/dist/src/chunk-4xd6zs3y.js +15 -0
- package/dist/src/chunk-51567pg8.js +4 -0
- package/dist/src/chunk-5agqsfev.js +4 -0
- package/dist/src/chunk-5d706gmr.js +4 -0
- package/dist/src/chunk-5kd4rqk7.js +5 -0
- package/dist/src/chunk-5s645vr4.js +4 -0
- package/dist/src/chunk-61t538bm.js +4 -0
- package/dist/src/chunk-6d3mmqxt.js +54 -0
- package/dist/src/chunk-6hyt398x.js +5 -0
- package/dist/src/chunk-6mnr8kpm.js +4 -0
- package/dist/src/chunk-6pg7bqck.js +4 -0
- package/dist/src/chunk-79q5xsdc.js +42 -0
- package/dist/src/chunk-7bdgand3.js +4 -0
- package/dist/src/chunk-84cp9dw5.js +4 -0
- package/dist/src/chunk-86f2h5ww.js +5 -0
- package/dist/src/chunk-8cghfzb2.js +19 -0
- package/dist/src/chunk-8en08r7q.js +5 -0
- package/dist/src/chunk-950qcq1e.js +10 -0
- package/dist/src/chunk-9rkfyt6q.js +5 -0
- package/dist/src/chunk-9tf2p9y9.js +5 -0
- package/dist/src/chunk-9y5bcy28.js +6 -0
- package/dist/src/chunk-a2sc4jm0.js +5 -0
- package/dist/src/chunk-a4k9rt7z.js +5 -0
- package/dist/src/chunk-aa5ng3d1.js +4 -0
- package/dist/src/chunk-ajsrz473.js +5 -0
- package/dist/src/chunk-b3h0a6ca.js +4 -0
- package/dist/src/chunk-b4cxdzwy.js +20 -0
- package/dist/src/chunk-b6a737qt.js +4 -0
- package/dist/src/chunk-bn64x5z5.js +5 -0
- package/dist/src/chunk-bvh649za.js +12 -0
- package/dist/src/chunk-c9nk1r78.js +5 -0
- package/dist/src/chunk-c9tyfg4j.js +26 -0
- package/dist/src/chunk-cfsdfqnm.js +4 -0
- package/dist/src/chunk-cxyf04jc.js +7 -0
- package/dist/src/chunk-d57432wq.js +4 -0
- package/dist/src/chunk-da08tx5v.js +4 -0
- package/dist/src/chunk-eka89q3k.js +4 -0
- package/dist/src/chunk-f2tc08m2.js +4 -0
- package/dist/src/chunk-f8tnk179.js +5 -0
- package/dist/src/chunk-f9s1kkhx.js +5 -0
- package/dist/src/chunk-fbp8a4rx.js +4 -0
- package/dist/src/chunk-fd2z0sze.js +4 -0
- package/dist/src/chunk-fk927f4q.js +54 -0
- package/dist/src/chunk-fxmr3a0f.js +4 -0
- package/dist/src/chunk-gaqwhd44.js +4 -0
- package/dist/src/chunk-ggtd5x5a.js +5 -0
- package/dist/src/chunk-gndcfrm7.js +4 -0
- package/dist/src/chunk-h3n4adc6.js +310 -0
- package/dist/src/chunk-h5pjbb83.js +4 -0
- package/dist/src/chunk-hgnnh302.js +4 -0
- package/dist/src/chunk-hmke8nhx.js +5 -0
- package/dist/src/chunk-j2bx12hn.js +4 -0
- package/dist/src/chunk-j70y1a2g.js +4 -0
- package/dist/src/chunk-jdqvcq0a.js +5 -0
- package/dist/src/chunk-jhnbfj19.js +55 -0
- package/dist/src/chunk-js1jpyxp.js +6 -0
- package/dist/src/chunk-kbjq0qvb.js +4 -0
- package/dist/src/chunk-kfwx57xd.js +4 -0
- package/dist/src/chunk-km0dy5vc.js +71 -0
- package/dist/src/chunk-kzwctna2.js +4 -0
- package/dist/src/chunk-m9ehyehy.js +4 -0
- package/dist/src/chunk-mct91p1f.js +4 -0
- package/dist/src/chunk-mf9spd4g.js +5 -0
- package/dist/src/chunk-mgrcansb.js +4 -0
- package/dist/src/chunk-mqc1d0eb.js +6 -0
- package/dist/src/chunk-n1zmpk0z.js +4 -0
- package/dist/src/chunk-ncyjf63g.js +4 -0
- package/dist/src/chunk-nr64d21q.js +973 -0
- package/dist/src/chunk-nwm2pq5v.js +168 -0
- package/dist/src/chunk-pm06b05d.js +9 -0
- package/dist/src/chunk-q50s00ry.js +4 -0
- package/dist/src/chunk-qv2918jt.js +4 -0
- package/dist/src/chunk-qwye1958.js +14 -0
- package/dist/src/chunk-r0f1q783.js +5 -0
- package/dist/src/chunk-r14wwk37.js +18 -0
- package/dist/src/chunk-r20pe1nv.js +5 -0
- package/dist/src/chunk-r8z9pfve.js +5 -0
- package/dist/src/chunk-rdpgkjf6.js +4 -0
- package/dist/src/chunk-rkr0dks9.js +5 -0
- package/dist/src/chunk-rn84t3sf.js +11 -0
- package/dist/src/chunk-s123kn7n.js +4 -0
- package/dist/src/chunk-s1zq65ny.js +4 -0
- package/dist/src/chunk-s73qn3fx.js +4 -0
- package/dist/src/chunk-sjn0nj4p.js +5 -0
- package/dist/src/chunk-sns0c35v.js +7 -0
- package/dist/src/chunk-stfzjr9y.js +8 -0
- package/dist/src/chunk-sz1a7p43.js +4 -0
- package/dist/src/chunk-t4dr5c8v.js +8 -0
- package/dist/src/chunk-tc8k9c1j.js +4 -0
- package/dist/src/chunk-teznhase.js +4 -0
- package/dist/src/chunk-ty9xgmz4.js +4 -0
- package/dist/src/chunk-tyazf3sk.js +145 -0
- package/dist/src/chunk-v6npjrjm.js +5 -0
- package/dist/src/chunk-v90es00d.js +4 -0
- package/dist/src/chunk-vbvtzkwz.js +5 -0
- package/dist/src/chunk-vefd8qee.js +8 -0
- package/dist/src/chunk-vs9r72ta.js +17 -0
- package/dist/src/chunk-w2mwa0jk.js +4 -0
- package/dist/src/chunk-w7zsh13a.js +9 -0
- package/dist/src/chunk-w88k0bgr.js +4 -0
- package/dist/src/chunk-wry6skrm.js +4 -0
- package/dist/src/chunk-wzdt0enk.js +4 -0
- package/dist/src/chunk-xhhv854c.js +4 -0
- package/dist/src/chunk-y58270hd.js +4 -0
- package/dist/src/chunk-yk0hmbex.js +4 -0
- package/dist/src/chunk-ympy4fdz.js +28 -0
- package/dist/src/chunk-yw436axy.js +4 -0
- package/dist/src/chunk-z04jrpjy.js +5 -0
- package/dist/src/chunk-z2xznczw.js +4 -0
- package/dist/src/chunk-z4xnrgps.js +4 -0
- package/dist/src/chunk-z7csyszv.js +4 -0
- package/dist/src/chunk-z8t0v07j.js +11 -0
- package/dist/src/chunk-z916af47.js +228 -0
- package/dist/src/chunk-zcr8he8q.js +5 -0
- package/dist/src/chunk-zd9vmkzn.js +9 -0
- package/dist/src/chunk-zg67wjkh.js +5 -0
- package/dist/src/chunk-zj939v0h.js +5 -0
- package/dist/src/chunk-zkdjwtc1.js +4 -0
- package/dist/src/chunk-zkv5kzt6.js +4 -0
- package/dist/src/daemon/processEntry.js +4 -0
- package/dist/src/index.js +4 -2797
- package/dist/src/runtime/bunRuntimeGuard.js +4 -0
- package/dist/src/utils/workers/iosBundleExtractWorker.js +2 -3
- package/node_modules/strtok3/lib/BufferSizeError.js +1 -1
- package/node_modules/strtok3/lib/TokenWriter.js +151 -0
- package/node_modules/strtok3/lib/core.js +1 -0
- package/node_modules/strtok3/package.json +2 -2
- package/node_modules/token-types/LICENSE.txt +9 -9
- package/node_modules/token-types/{lib → dist/lib}/index.js +21 -3
- package/node_modules/token-types/package.json +81 -81
- package/package.json +10 -10
- package/schemas/README.md +16 -0
- package/schemas/prototype-icon-names.json +302 -0
- package/schemas/prototype-platform-permissions.json +75 -0
- package/schemas/test-plan.schema.json +2 -2
- package/node_modules/@borewit/text-codec/README.md +0 -87
- package/node_modules/@jimp/diff/node_modules/pixelmatch/README.md +0 -110
- package/node_modules/@jimp/diff/node_modules/pixelmatch/node_modules/pngjs/README.md +0 -433
- package/node_modules/@jimp/file-ops/dist/browser/index.js +0 -8
- package/node_modules/@jimp/js-png/README.md +0 -35
- package/node_modules/@jimp/js-png/src/__image_snapshots__/index-node-test-ts-png-should-use-png-options-1-snap.png +0 -0
- package/node_modules/@jimp/js-png/src/output.png +0 -0
- package/node_modules/@jimp/js-png/vitest.config.browser.mjs +0 -3
- package/node_modules/@jimp/plugin-resize/README.md +0 -12
- package/node_modules/@jimp/plugin-resize/vitest.config.browser.mjs +0 -3
- package/node_modules/@tokenizer/inflate/README.md +0 -114
- package/node_modules/@tokenizer/token/README.md +0 -19
- package/node_modules/await-to-js/README.md +0 -82
- package/node_modules/debug/README.md +0 -481
- package/node_modules/exif-parser/README.md +0 -83
- package/node_modules/file-type/readme.md +0 -667
- package/node_modules/ieee754/README.md +0 -51
- package/node_modules/mime/README.md +0 -178
- package/node_modules/ms/readme.md +0 -59
- package/node_modules/parse-bmfont-xml/README.md +0 -74
- package/node_modules/parse-bmfont-xml/lib/browser.js +0 -85
- package/node_modules/parse-bmfont-xml/node_modules/xml2js/README.md +0 -507
- package/node_modules/pngjs/README.md +0 -287
- package/node_modules/sax/README.md +0 -228
- package/node_modules/strtok3/README.md +0 -736
- package/node_modules/tinycolor2/README.md +0 -492
- package/node_modules/tinycolor2/cjs/test.js +0 -2191
- package/node_modules/tinycolor2/cjs/test_template.js +0 -26
- package/node_modules/tinycolor2/deno_asserts@0.168.0.mjs +0 -807
- package/node_modules/tinycolor2/esm/test.js +0 -2189
- package/node_modules/tinycolor2/esm/test_template.js +0 -24
- package/node_modules/tinycolor2/tinycolor.js +0 -1191
- package/node_modules/token-types/README.md +0 -120
- package/node_modules/uint8array-extras/readme.md +0 -318
- package/node_modules/xml-parse-from-string/README.md +0 -35
- package/node_modules/xmlbuilder/README.md +0 -86
- package/node_modules/zod/README.md +0 -208
- package/node_modules/zod/v4/locales/ar.d.cts +0 -4
- package/node_modules/zod/v4/locales/ar.d.ts +0 -4
- package/node_modules/zod/v4/locales/az.d.cts +0 -4
- package/node_modules/zod/v4/locales/az.d.ts +0 -4
- package/node_modules/zod/v4/locales/be.d.cts +0 -4
- package/node_modules/zod/v4/locales/be.d.ts +0 -4
- package/node_modules/zod/v4/locales/ca.d.cts +0 -4
- package/node_modules/zod/v4/locales/ca.d.ts +0 -4
- package/node_modules/zod/v4/locales/cs.d.cts +0 -4
- package/node_modules/zod/v4/locales/cs.d.ts +0 -4
- package/node_modules/zod/v4/locales/de.d.cts +0 -4
- package/node_modules/zod/v4/locales/de.d.ts +0 -4
- package/node_modules/zod/v4/locales/en.d.cts +0 -5
- package/node_modules/zod/v4/locales/en.d.ts +0 -5
- package/node_modules/zod/v4/locales/eo.d.cts +0 -5
- package/node_modules/zod/v4/locales/eo.d.ts +0 -5
- package/node_modules/zod/v4/locales/es.d.cts +0 -4
- package/node_modules/zod/v4/locales/es.d.ts +0 -4
- package/node_modules/zod/v4/locales/fa.d.cts +0 -4
- package/node_modules/zod/v4/locales/fa.d.ts +0 -4
- package/node_modules/zod/v4/locales/fi.d.cts +0 -4
- package/node_modules/zod/v4/locales/fi.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -4
- package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr.d.cts +0 -4
- package/node_modules/zod/v4/locales/fr.d.ts +0 -4
- package/node_modules/zod/v4/locales/he.d.cts +0 -4
- package/node_modules/zod/v4/locales/he.d.ts +0 -4
- package/node_modules/zod/v4/locales/hu.d.cts +0 -4
- package/node_modules/zod/v4/locales/hu.d.ts +0 -4
- package/node_modules/zod/v4/locales/id.d.cts +0 -4
- package/node_modules/zod/v4/locales/id.d.ts +0 -4
- package/node_modules/zod/v4/locales/index.d.cts +0 -39
- package/node_modules/zod/v4/locales/index.d.ts +0 -39
- package/node_modules/zod/v4/locales/it.d.cts +0 -4
- package/node_modules/zod/v4/locales/it.d.ts +0 -4
- package/node_modules/zod/v4/locales/ja.d.cts +0 -4
- package/node_modules/zod/v4/locales/ja.d.ts +0 -4
- package/node_modules/zod/v4/locales/kh.d.cts +0 -4
- package/node_modules/zod/v4/locales/kh.d.ts +0 -4
- package/node_modules/zod/v4/locales/ko.d.cts +0 -4
- package/node_modules/zod/v4/locales/ko.d.ts +0 -4
- package/node_modules/zod/v4/locales/mk.d.cts +0 -4
- package/node_modules/zod/v4/locales/mk.d.ts +0 -4
- package/node_modules/zod/v4/locales/ms.d.cts +0 -4
- package/node_modules/zod/v4/locales/ms.d.ts +0 -4
- package/node_modules/zod/v4/locales/nl.d.cts +0 -4
- package/node_modules/zod/v4/locales/nl.d.ts +0 -4
- package/node_modules/zod/v4/locales/no.d.cts +0 -4
- package/node_modules/zod/v4/locales/no.d.ts +0 -4
- package/node_modules/zod/v4/locales/ota.d.cts +0 -4
- package/node_modules/zod/v4/locales/ota.d.ts +0 -4
- package/node_modules/zod/v4/locales/pl.d.cts +0 -4
- package/node_modules/zod/v4/locales/pl.d.ts +0 -4
- package/node_modules/zod/v4/locales/ps.d.cts +0 -4
- package/node_modules/zod/v4/locales/ps.d.ts +0 -4
- package/node_modules/zod/v4/locales/pt.d.cts +0 -4
- package/node_modules/zod/v4/locales/pt.d.ts +0 -4
- package/node_modules/zod/v4/locales/ru.d.cts +0 -4
- package/node_modules/zod/v4/locales/ru.d.ts +0 -4
- package/node_modules/zod/v4/locales/sl.d.cts +0 -4
- package/node_modules/zod/v4/locales/sl.d.ts +0 -4
- package/node_modules/zod/v4/locales/sv.d.cts +0 -4
- package/node_modules/zod/v4/locales/sv.d.ts +0 -4
- package/node_modules/zod/v4/locales/ta.d.cts +0 -4
- package/node_modules/zod/v4/locales/ta.d.ts +0 -4
- package/node_modules/zod/v4/locales/th.d.cts +0 -4
- package/node_modules/zod/v4/locales/th.d.ts +0 -4
- package/node_modules/zod/v4/locales/tr.d.cts +0 -5
- package/node_modules/zod/v4/locales/tr.d.ts +0 -5
- package/node_modules/zod/v4/locales/ua.d.cts +0 -4
- package/node_modules/zod/v4/locales/ua.d.ts +0 -4
- package/node_modules/zod/v4/locales/ur.d.cts +0 -4
- package/node_modules/zod/v4/locales/ur.d.ts +0 -4
- package/node_modules/zod/v4/locales/vi.d.cts +0 -4
- package/node_modules/zod/v4/locales/vi.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -4
- package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -4
- package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# ieee754 [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
|
|
2
|
-
|
|
3
|
-
[travis-image]: https://img.shields.io/travis/feross/ieee754/master.svg
|
|
4
|
-
[travis-url]: https://travis-ci.org/feross/ieee754
|
|
5
|
-
[npm-image]: https://img.shields.io/npm/v/ieee754.svg
|
|
6
|
-
[npm-url]: https://npmjs.org/package/ieee754
|
|
7
|
-
[downloads-image]: https://img.shields.io/npm/dm/ieee754.svg
|
|
8
|
-
[downloads-url]: https://npmjs.org/package/ieee754
|
|
9
|
-
[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
|
|
10
|
-
[standard-url]: https://standardjs.com
|
|
11
|
-
|
|
12
|
-
[![saucelabs][saucelabs-image]][saucelabs-url]
|
|
13
|
-
|
|
14
|
-
[saucelabs-image]: https://saucelabs.com/browser-matrix/ieee754.svg
|
|
15
|
-
[saucelabs-url]: https://saucelabs.com/u/ieee754
|
|
16
|
-
|
|
17
|
-
### Read/write IEEE754 floating point numbers from/to a Buffer or array-like object.
|
|
18
|
-
|
|
19
|
-
## install
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
npm install ieee754
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## methods
|
|
26
|
-
|
|
27
|
-
`var ieee754 = require('ieee754')`
|
|
28
|
-
|
|
29
|
-
The `ieee754` object has the following functions:
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
ieee754.read = function (buffer, offset, isLE, mLen, nBytes)
|
|
33
|
-
ieee754.write = function (buffer, value, offset, isLE, mLen, nBytes)
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
The arguments mean the following:
|
|
37
|
-
|
|
38
|
-
- buffer = the buffer
|
|
39
|
-
- offset = offset into the buffer
|
|
40
|
-
- value = value to set (only for `write`)
|
|
41
|
-
- isLe = is little endian?
|
|
42
|
-
- mLen = mantissa length
|
|
43
|
-
- nBytes = number of bytes
|
|
44
|
-
|
|
45
|
-
## what is ieee754?
|
|
46
|
-
|
|
47
|
-
The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point computation. [Read more](http://en.wikipedia.org/wiki/IEEE_floating_point).
|
|
48
|
-
|
|
49
|
-
## license
|
|
50
|
-
|
|
51
|
-
BSD 3 Clause. Copyright (c) 2008, Fair Oaks Labs, Inc.
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
-- This file is auto-generated from src/README_js.md. Changes should be made there.
|
|
3
|
-
-->
|
|
4
|
-
# Mime
|
|
5
|
-
|
|
6
|
-
A comprehensive, compact MIME type module.
|
|
7
|
-
|
|
8
|
-
[](https://travis-ci.org/broofa/mime)
|
|
9
|
-
|
|
10
|
-
## Install
|
|
11
|
-
|
|
12
|
-
### NPM
|
|
13
|
-
```
|
|
14
|
-
npm install mime
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
### Browser
|
|
18
|
-
|
|
19
|
-
It is recommended that you use a bundler such as
|
|
20
|
-
[webpack](https://webpack.github.io/) or [browserify](http://browserify.org/) to
|
|
21
|
-
package your code. However, browser-ready versions are available via
|
|
22
|
-
skypack.dev as follows:
|
|
23
|
-
```
|
|
24
|
-
// Full version
|
|
25
|
-
<script type="module">
|
|
26
|
-
import mime from "https://cdn.skypack.dev/mime";
|
|
27
|
-
</script>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
// "lite" version
|
|
32
|
-
<script type="module">
|
|
33
|
-
import mime from "https://cdn.skypack.dev/mime/lite";
|
|
34
|
-
</script>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Quick Start
|
|
38
|
-
|
|
39
|
-
For the full version (800+ MIME types, 1,000+ extensions):
|
|
40
|
-
|
|
41
|
-
```javascript
|
|
42
|
-
const mime = require('mime');
|
|
43
|
-
|
|
44
|
-
mime.getType('txt'); // ⇨ 'text/plain'
|
|
45
|
-
mime.getExtension('text/plain'); // ⇨ 'txt'
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
See [Mime API](#mime-api) below for API details.
|
|
49
|
-
|
|
50
|
-
## Lite Version
|
|
51
|
-
|
|
52
|
-
The "lite" version of this module omits vendor-specific (`*/vnd.*`) and
|
|
53
|
-
experimental (`*/x-*`) types. It weighs in at ~2.5KB, compared to 8KB for the
|
|
54
|
-
full version. To load the lite version:
|
|
55
|
-
|
|
56
|
-
```javascript
|
|
57
|
-
const mime = require('mime/lite');
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Mime .vs. mime-types .vs. mime-db modules
|
|
61
|
-
|
|
62
|
-
For those of you wondering about the difference between these [popular] NPM modules,
|
|
63
|
-
here's a brief rundown ...
|
|
64
|
-
|
|
65
|
-
[`mime-db`](https://github.com/jshttp/mime-db) is "the source of
|
|
66
|
-
truth" for MIME type information. It is not an API. Rather, it is a canonical
|
|
67
|
-
dataset of mime type definitions pulled from IANA, Apache, NGINX, and custom mappings
|
|
68
|
-
submitted by the Node.js community.
|
|
69
|
-
|
|
70
|
-
[`mime-types`](https://github.com/jshttp/mime-types) is a thin
|
|
71
|
-
wrapper around mime-db that provides an API drop-in compatible(ish) with `mime @ < v1.3.6` API.
|
|
72
|
-
|
|
73
|
-
`mime` is, as of v2, a self-contained module bundled with a pre-optimized version
|
|
74
|
-
of the `mime-db` dataset. It provides a simplified API with the following characteristics:
|
|
75
|
-
|
|
76
|
-
* Intelligently resolved type conflicts (See [mime-score](https://github.com/broofa/mime-score) for details)
|
|
77
|
-
* Method naming consistent with industry best-practices
|
|
78
|
-
* Compact footprint. E.g. The minified+compressed sizes of the various modules:
|
|
79
|
-
|
|
80
|
-
Module | Size
|
|
81
|
-
--- | ---
|
|
82
|
-
`mime-db` | 18 KB
|
|
83
|
-
`mime-types` | same as mime-db
|
|
84
|
-
`mime` | 8 KB
|
|
85
|
-
`mime/lite` | 2 KB
|
|
86
|
-
|
|
87
|
-
## Mime API
|
|
88
|
-
|
|
89
|
-
Both `require('mime')` and `require('mime/lite')` return instances of the MIME
|
|
90
|
-
class, documented below.
|
|
91
|
-
|
|
92
|
-
Note: Inputs to this API are case-insensitive. Outputs (returned values) will
|
|
93
|
-
be lowercase.
|
|
94
|
-
|
|
95
|
-
### new Mime(typeMap, ... more maps)
|
|
96
|
-
|
|
97
|
-
Most users of this module will not need to create Mime instances directly.
|
|
98
|
-
However if you would like to create custom mappings, you may do so as follows
|
|
99
|
-
...
|
|
100
|
-
|
|
101
|
-
```javascript
|
|
102
|
-
// Require Mime class
|
|
103
|
-
const Mime = require('mime/Mime');
|
|
104
|
-
|
|
105
|
-
// Define mime type -> extensions map
|
|
106
|
-
const typeMap = {
|
|
107
|
-
'text/abc': ['abc', 'alpha', 'bet'],
|
|
108
|
-
'text/def': ['leppard']
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
// Create and use Mime instance
|
|
112
|
-
const myMime = new Mime(typeMap);
|
|
113
|
-
myMime.getType('abc'); // ⇨ 'text/abc'
|
|
114
|
-
myMime.getExtension('text/def'); // ⇨ 'leppard'
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
If more than one map argument is provided, each map is `define()`ed (see below), in order.
|
|
118
|
-
|
|
119
|
-
### mime.getType(pathOrExtension)
|
|
120
|
-
|
|
121
|
-
Get mime type for the given path or extension. E.g.
|
|
122
|
-
|
|
123
|
-
```javascript
|
|
124
|
-
mime.getType('js'); // ⇨ 'application/javascript'
|
|
125
|
-
mime.getType('json'); // ⇨ 'application/json'
|
|
126
|
-
|
|
127
|
-
mime.getType('txt'); // ⇨ 'text/plain'
|
|
128
|
-
mime.getType('dir/text.txt'); // ⇨ 'text/plain'
|
|
129
|
-
mime.getType('dir\\text.txt'); // ⇨ 'text/plain'
|
|
130
|
-
mime.getType('.text.txt'); // ⇨ 'text/plain'
|
|
131
|
-
mime.getType('.txt'); // ⇨ 'text/plain'
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
`null` is returned in cases where an extension is not detected or recognized
|
|
135
|
-
|
|
136
|
-
```javascript
|
|
137
|
-
mime.getType('foo/txt'); // ⇨ null
|
|
138
|
-
mime.getType('bogus_type'); // ⇨ null
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
### mime.getExtension(type)
|
|
142
|
-
Get extension for the given mime type. Charset options (often included in
|
|
143
|
-
Content-Type headers) are ignored.
|
|
144
|
-
|
|
145
|
-
```javascript
|
|
146
|
-
mime.getExtension('text/plain'); // ⇨ 'txt'
|
|
147
|
-
mime.getExtension('application/json'); // ⇨ 'json'
|
|
148
|
-
mime.getExtension('text/html; charset=utf8'); // ⇨ 'html'
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### mime.define(typeMap[, force = false])
|
|
152
|
-
|
|
153
|
-
Define [more] type mappings.
|
|
154
|
-
|
|
155
|
-
`typeMap` is a map of type -> extensions, as documented in `new Mime`, above.
|
|
156
|
-
|
|
157
|
-
By default this method will throw an error if you try to map a type to an
|
|
158
|
-
extension that is already assigned to another type. Passing `true` for the
|
|
159
|
-
`force` argument will suppress this behavior (overriding any previous mapping).
|
|
160
|
-
|
|
161
|
-
```javascript
|
|
162
|
-
mime.define({'text/x-abc': ['abc', 'abcd']});
|
|
163
|
-
|
|
164
|
-
mime.getType('abcd'); // ⇨ 'text/x-abc'
|
|
165
|
-
mime.getExtension('text/x-abc') // ⇨ 'abc'
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
## Command Line
|
|
169
|
-
|
|
170
|
-
mime [path_or_extension]
|
|
171
|
-
|
|
172
|
-
E.g.
|
|
173
|
-
|
|
174
|
-
> mime scripts/jquery.js
|
|
175
|
-
application/javascript
|
|
176
|
-
|
|
177
|
-
----
|
|
178
|
-
Markdown generated from [src/README_js.md](src/README_js.md) by [](https://github.com/broofa/runmd)
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# ms
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-
Use this package to easily convert various time formats to milliseconds.
|
|
6
|
-
|
|
7
|
-
## Examples
|
|
8
|
-
|
|
9
|
-
```js
|
|
10
|
-
ms('2 days') // 172800000
|
|
11
|
-
ms('1d') // 86400000
|
|
12
|
-
ms('10h') // 36000000
|
|
13
|
-
ms('2.5 hrs') // 9000000
|
|
14
|
-
ms('2h') // 7200000
|
|
15
|
-
ms('1m') // 60000
|
|
16
|
-
ms('5s') // 5000
|
|
17
|
-
ms('1y') // 31557600000
|
|
18
|
-
ms('100') // 100
|
|
19
|
-
ms('-3 days') // -259200000
|
|
20
|
-
ms('-1h') // -3600000
|
|
21
|
-
ms('-200') // -200
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### Convert from Milliseconds
|
|
25
|
-
|
|
26
|
-
```js
|
|
27
|
-
ms(60000) // "1m"
|
|
28
|
-
ms(2 * 60000) // "2m"
|
|
29
|
-
ms(-3 * 60000) // "-3m"
|
|
30
|
-
ms(ms('10 hours')) // "10h"
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
### Time Format Written-Out
|
|
34
|
-
|
|
35
|
-
```js
|
|
36
|
-
ms(60000, { long: true }) // "1 minute"
|
|
37
|
-
ms(2 * 60000, { long: true }) // "2 minutes"
|
|
38
|
-
ms(-3 * 60000, { long: true }) // "-3 minutes"
|
|
39
|
-
ms(ms('10 hours'), { long: true }) // "10 hours"
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## Features
|
|
43
|
-
|
|
44
|
-
- Works both in [Node.js](https://nodejs.org) and in the browser
|
|
45
|
-
- If a number is supplied to `ms`, a string with a unit is returned
|
|
46
|
-
- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
|
|
47
|
-
- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
|
|
48
|
-
|
|
49
|
-
## Related Packages
|
|
50
|
-
|
|
51
|
-
- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
|
|
52
|
-
|
|
53
|
-
## Caught a Bug?
|
|
54
|
-
|
|
55
|
-
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
|
|
56
|
-
2. Link the package to the global module directory: `npm link`
|
|
57
|
-
3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
|
|
58
|
-
|
|
59
|
-
As always, you can run the tests using: `npm test`
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# parse-bmfont-xml
|
|
2
|
-
|
|
3
|
-
[](http://github.com/badges/stability-badges)
|
|
4
|
-
|
|
5
|
-
Parses XML [BMFont files](http://www.angelcode.com/products/bmfont/).
|
|
6
|
-
|
|
7
|
-
Takes a string or Buffer:
|
|
8
|
-
|
|
9
|
-
```js
|
|
10
|
-
var fs = require('fs')
|
|
11
|
-
var parse = require('parse-bmfont-xml')
|
|
12
|
-
|
|
13
|
-
fs.readFileSync(__dirname+'/Arial.fnt', function(err, data) {
|
|
14
|
-
var result = parse(data)
|
|
15
|
-
console.log(result.info.face) // "Arial"
|
|
16
|
-
console.log(result.pages) // [ 'sheet0.png' ]
|
|
17
|
-
console.log(result.chars) // [ ... char data ... ]
|
|
18
|
-
console.log(result.kernings) // [ ... kernings data ... ]
|
|
19
|
-
})
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Also works in the browser, for example using XHR:
|
|
23
|
-
|
|
24
|
-
```js
|
|
25
|
-
var parse = require('parse-bmfont-xml')
|
|
26
|
-
var xhr = require('xhr')
|
|
27
|
-
|
|
28
|
-
xhr({ uri: 'fonts/NexaLight32.xml' }, function(err, res, body) {
|
|
29
|
-
if (err)
|
|
30
|
-
throw err
|
|
31
|
-
var result = parse(body)
|
|
32
|
-
console.log(result.info.face)
|
|
33
|
-
})
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
The spec for the returned JSON object is [here](https://github.com/mattdesl/bmfont2json/wiki/JsonSpec). The input XML should match the spec with a `<font>` root element, see [test/Nexa Light-32.fnt](test/Nexa Light-32.fnt) for an example.
|
|
37
|
-
|
|
38
|
-
## See Also
|
|
39
|
-
|
|
40
|
-
See [text-modules](https://github.com/mattdesl/text-modules) for related modules.
|
|
41
|
-
|
|
42
|
-
## Usage
|
|
43
|
-
|
|
44
|
-
[](https://www.npmjs.com/package/parse-bmfont-xml)
|
|
45
|
-
|
|
46
|
-
#### `result = parse(data)`
|
|
47
|
-
|
|
48
|
-
Parses `data`, a string or Buffer that represents XML data of an AngelCode BMFont file. The returned `result` object looks like this:
|
|
49
|
-
|
|
50
|
-
```js
|
|
51
|
-
{
|
|
52
|
-
pages: [
|
|
53
|
-
"sheet_0.png",
|
|
54
|
-
"sheet_1.png"
|
|
55
|
-
],
|
|
56
|
-
chars: [
|
|
57
|
-
{ chnl, height, id, page, width, x, y, xoffset, yoffset, xadvance },
|
|
58
|
-
...
|
|
59
|
-
],
|
|
60
|
-
info: { ... },
|
|
61
|
-
common: { ... },
|
|
62
|
-
kernings: [
|
|
63
|
-
{ first, second, amount }
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
If the data is malformed, an error will be thrown.
|
|
69
|
-
|
|
70
|
-
The browser implementation relies on [xml-parse-from-string](https://github.com/Jam3/xml-parse-from-string), which may not work in environments without valid DOM APIs (like CocoonJS).
|
|
71
|
-
|
|
72
|
-
## License
|
|
73
|
-
|
|
74
|
-
MIT, see [LICENSE.md](http://github.com/mattdesl/parse-bmfont-xml/blob/master/LICENSE.md) for details.
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
var parseAttributes = require('./parse-attribs')
|
|
2
|
-
var parseFromString = require('xml-parse-from-string')
|
|
3
|
-
|
|
4
|
-
//In some cases element.attribute.nodeName can return
|
|
5
|
-
//all lowercase values.. so we need to map them to the correct
|
|
6
|
-
//case
|
|
7
|
-
var NAME_MAP = {
|
|
8
|
-
scaleh: 'scaleH',
|
|
9
|
-
scalew: 'scaleW',
|
|
10
|
-
stretchh: 'stretchH',
|
|
11
|
-
lineheight: 'lineHeight',
|
|
12
|
-
alphachnl: 'alphaChnl',
|
|
13
|
-
redchnl: 'redChnl',
|
|
14
|
-
greenchnl: 'greenChnl',
|
|
15
|
-
bluechnl: 'blueChnl'
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
module.exports = function parse(data) {
|
|
19
|
-
data = data.toString()
|
|
20
|
-
|
|
21
|
-
var xmlRoot = parseFromString(data)
|
|
22
|
-
var output = {
|
|
23
|
-
pages: [],
|
|
24
|
-
chars: [],
|
|
25
|
-
kernings: []
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
//get config settings
|
|
29
|
-
;['info', 'common'].forEach(function(key) {
|
|
30
|
-
var element = xmlRoot.getElementsByTagName(key)[0]
|
|
31
|
-
if (element)
|
|
32
|
-
output[key] = parseAttributes(getAttribs(element))
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
//get page info
|
|
36
|
-
var pageRoot = xmlRoot.getElementsByTagName('pages')[0]
|
|
37
|
-
if (!pageRoot)
|
|
38
|
-
throw new Error('malformed file -- no <pages> element')
|
|
39
|
-
var pages = pageRoot.getElementsByTagName('page')
|
|
40
|
-
for (var i=0; i<pages.length; i++) {
|
|
41
|
-
var p = pages[i]
|
|
42
|
-
var id = parseInt(p.getAttribute('id'), 10)
|
|
43
|
-
var file = p.getAttribute('file')
|
|
44
|
-
if (isNaN(id))
|
|
45
|
-
throw new Error('malformed file -- page "id" attribute is NaN')
|
|
46
|
-
if (!file)
|
|
47
|
-
throw new Error('malformed file -- needs page "file" attribute')
|
|
48
|
-
output.pages[parseInt(id, 10)] = file
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
//get kernings / chars
|
|
52
|
-
;['chars', 'kernings'].forEach(function(key) {
|
|
53
|
-
var element = xmlRoot.getElementsByTagName(key)[0]
|
|
54
|
-
if (!element)
|
|
55
|
-
return
|
|
56
|
-
var childTag = key.substring(0, key.length-1)
|
|
57
|
-
var children = element.getElementsByTagName(childTag)
|
|
58
|
-
for (var i=0; i<children.length; i++) {
|
|
59
|
-
var child = children[i]
|
|
60
|
-
output[key].push(parseAttributes(getAttribs(child)))
|
|
61
|
-
}
|
|
62
|
-
})
|
|
63
|
-
return output
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function getAttribs(element) {
|
|
67
|
-
var attribs = getAttribList(element)
|
|
68
|
-
return attribs.reduce(function(dict, attrib) {
|
|
69
|
-
var key = mapName(attrib.nodeName)
|
|
70
|
-
dict[key] = attrib.nodeValue
|
|
71
|
-
return dict
|
|
72
|
-
}, {})
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function getAttribList(element) {
|
|
76
|
-
//IE8+ and modern browsers
|
|
77
|
-
var attribs = []
|
|
78
|
-
for (var i=0; i<element.attributes.length; i++)
|
|
79
|
-
attribs.push(element.attributes[i])
|
|
80
|
-
return attribs
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function mapName(nodeName) {
|
|
84
|
-
return NAME_MAP[nodeName.toLowerCase()] || nodeName
|
|
85
|
-
}
|