@dragon708/docmind-markdown 1.2.5 → 1.2.6

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 (321) hide show
  1. package/node_modules/music-metadata/LICENSE.txt +3 -3
  2. package/node_modules/music-metadata/README.md +246 -690
  3. package/node_modules/music-metadata/lib/ParserFactory.d.ts +31 -27
  4. package/node_modules/music-metadata/lib/ParserFactory.js +219 -108
  5. package/node_modules/music-metadata/lib/aiff/AiffParser.d.ts +2 -2
  6. package/node_modules/music-metadata/lib/aiff/AiffParser.js +38 -34
  7. package/node_modules/music-metadata/lib/aiff/AiffTagMap.d.ts +1 -1
  8. package/node_modules/music-metadata/lib/aiff/AiffTagMap.js +7 -2
  9. package/node_modules/music-metadata/lib/aiff/AiffToken.d.ts +6 -32
  10. package/node_modules/music-metadata/lib/aiff/AiffToken.js +17 -27
  11. package/node_modules/music-metadata/lib/apev2/APEv2Parser.d.ts +8 -24
  12. package/node_modules/music-metadata/lib/apev2/APEv2Parser.js +66 -78
  13. package/node_modules/music-metadata/lib/apev2/APEv2TagMapper.d.ts +1 -1
  14. package/node_modules/music-metadata/lib/apev2/APEv2TagMapper.js +8 -4
  15. package/node_modules/music-metadata/lib/apev2/APEv2Token.d.ts +11 -10
  16. package/node_modules/music-metadata/lib/apev2/APEv2Token.js +27 -16
  17. package/node_modules/music-metadata/lib/asf/AsfObject.d.ts +53 -59
  18. package/node_modules/music-metadata/lib/asf/AsfObject.js +131 -97
  19. package/node_modules/music-metadata/lib/asf/AsfParser.d.ts +1 -1
  20. package/node_modules/music-metadata/lib/asf/AsfParser.js +43 -42
  21. package/node_modules/music-metadata/lib/asf/AsfTagMapper.d.ts +2 -2
  22. package/node_modules/music-metadata/lib/asf/AsfTagMapper.js +10 -6
  23. package/node_modules/music-metadata/lib/asf/AsfUtil.d.ts +13 -4
  24. package/node_modules/music-metadata/lib/asf/AsfUtil.js +36 -30
  25. package/node_modules/music-metadata/lib/asf/GUID.d.ts +84 -0
  26. package/node_modules/music-metadata/lib/asf/GUID.js +121 -0
  27. package/node_modules/music-metadata/lib/common/BasicParser.d.ts +9 -9
  28. package/node_modules/music-metadata/lib/common/BasicParser.js +7 -2
  29. package/node_modules/music-metadata/lib/common/CaseInsensitiveTagMap.d.ts +3 -3
  30. package/node_modules/music-metadata/lib/common/CaseInsensitiveTagMap.js +7 -2
  31. package/node_modules/music-metadata/lib/common/CombinedTagMapper.d.ts +5 -5
  32. package/node_modules/music-metadata/lib/common/CombinedTagMapper.js +28 -24
  33. package/node_modules/music-metadata/lib/common/FourCC.d.ts +1 -1
  34. package/node_modules/music-metadata/lib/common/FourCC.js +11 -10
  35. package/node_modules/music-metadata/lib/common/GenericTagMapper.d.ts +13 -13
  36. package/node_modules/music-metadata/lib/common/GenericTagMapper.js +12 -7
  37. package/node_modules/music-metadata/lib/common/GenericTagTypes.d.ts +6 -7
  38. package/node_modules/music-metadata/lib/common/GenericTagTypes.js +85 -86
  39. package/node_modules/music-metadata/lib/common/MetadataCollector.d.ts +10 -20
  40. package/node_modules/music-metadata/lib/common/MetadataCollector.js +69 -100
  41. package/node_modules/music-metadata/lib/common/RandomFileReader.d.ts +22 -0
  42. package/node_modules/music-metadata/lib/common/RandomFileReader.js +34 -0
  43. package/node_modules/music-metadata/lib/common/RandomUint8ArrayReader.d.ts +18 -0
  44. package/node_modules/music-metadata/lib/common/RandomUint8ArrayReader.js +25 -0
  45. package/node_modules/music-metadata/lib/common/Util.d.ts +12 -11
  46. package/node_modules/music-metadata/lib/common/Util.js +53 -47
  47. package/node_modules/music-metadata/lib/core.d.ts +15 -42
  48. package/node_modules/music-metadata/lib/core.js +38 -74
  49. package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.d.ts +1 -16
  50. package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.js +44 -55
  51. package/node_modules/music-metadata/lib/dsdiff/DsdiffToken.d.ts +3 -3
  52. package/node_modules/music-metadata/lib/dsdiff/DsdiffToken.js +7 -4
  53. package/node_modules/music-metadata/lib/dsf/DsfChunk.d.ts +10 -11
  54. package/node_modules/music-metadata/lib/dsf/DsfChunk.js +19 -15
  55. package/node_modules/music-metadata/lib/dsf/DsfParser.d.ts +1 -16
  56. package/node_modules/music-metadata/lib/dsf/DsfParser.js +20 -21
  57. package/node_modules/music-metadata/lib/flac/FlacParser.d.ts +15 -16
  58. package/node_modules/music-metadata/lib/flac/FlacParser.js +119 -69
  59. package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.d.ts +3 -7
  60. package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.js +36 -39
  61. package/node_modules/music-metadata/lib/id3v1/ID3v1TagMap.d.ts +1 -1
  62. package/node_modules/music-metadata/lib/id3v1/ID3v1TagMap.js +7 -2
  63. package/node_modules/music-metadata/lib/id3v2/AbstractID3Parser.d.ts +2 -2
  64. package/node_modules/music-metadata/lib/id3v2/AbstractID3Parser.js +19 -15
  65. package/node_modules/music-metadata/lib/id3v2/FrameParser.d.ts +3 -64
  66. package/node_modules/music-metadata/lib/id3v2/FrameParser.js +103 -244
  67. package/node_modules/music-metadata/lib/id3v2/ID3v22TagMapper.d.ts +2 -2
  68. package/node_modules/music-metadata/lib/id3v2/ID3v22TagMapper.js +16 -6
  69. package/node_modules/music-metadata/lib/id3v2/ID3v24TagMapper.d.ts +5 -5
  70. package/node_modules/music-metadata/lib/id3v2/ID3v24TagMapper.js +35 -36
  71. package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.d.ts +6 -11
  72. package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.js +104 -91
  73. package/node_modules/music-metadata/lib/id3v2/ID3v2Token.d.ts +29 -67
  74. package/node_modules/music-metadata/lib/id3v2/ID3v2Token.js +36 -76
  75. package/node_modules/music-metadata/lib/iff/index.d.ts +1 -1
  76. package/node_modules/music-metadata/lib/iff/index.js +7 -4
  77. package/node_modules/music-metadata/lib/index.d.ts +31 -8
  78. package/node_modules/music-metadata/lib/index.js +53 -32
  79. package/node_modules/music-metadata/lib/lyrics3/Lyrics3.d.ts +2 -2
  80. package/node_modules/music-metadata/lib/lyrics3/Lyrics3.js +13 -13
  81. package/node_modules/music-metadata/lib/matroska/MatroskaDtd.d.ts +2 -2
  82. package/node_modules/music-metadata/lib/matroska/MatroskaDtd.js +242 -246
  83. package/node_modules/music-metadata/lib/matroska/MatroskaParser.d.ts +24 -6
  84. package/node_modules/music-metadata/lib/matroska/MatroskaParser.js +218 -124
  85. package/node_modules/music-metadata/lib/matroska/MatroskaTagMapper.d.ts +1 -1
  86. package/node_modules/music-metadata/lib/matroska/MatroskaTagMapper.js +7 -3
  87. package/node_modules/music-metadata/lib/matroska/types.d.ts +76 -43
  88. package/node_modules/music-metadata/lib/matroska/types.js +33 -27
  89. package/node_modules/music-metadata/lib/mp4/Atom.d.ts +7 -7
  90. package/node_modules/music-metadata/lib/mp4/Atom.js +22 -15
  91. package/node_modules/music-metadata/lib/mp4/AtomToken.d.ts +18 -110
  92. package/node_modules/music-metadata/lib/mp4/AtomToken.js +66 -184
  93. package/node_modules/music-metadata/lib/mp4/MP4Parser.d.ts +4 -6
  94. package/node_modules/music-metadata/lib/mp4/MP4Parser.js +128 -255
  95. package/node_modules/music-metadata/lib/mp4/MP4TagMapper.d.ts +4 -4
  96. package/node_modules/music-metadata/lib/mp4/MP4TagMapper.js +12 -8
  97. package/node_modules/music-metadata/lib/mpeg/ExtendedLameHeader.d.ts +5 -5
  98. package/node_modules/music-metadata/lib/mpeg/ExtendedLameHeader.js +10 -7
  99. package/node_modules/music-metadata/lib/mpeg/MpegParser.d.ts +4 -17
  100. package/node_modules/music-metadata/lib/mpeg/MpegParser.js +131 -176
  101. package/node_modules/music-metadata/lib/mpeg/ReplayGainDataFormat.d.ts +14 -16
  102. package/node_modules/music-metadata/lib/mpeg/ReplayGainDataFormat.js +19 -14
  103. package/node_modules/music-metadata/lib/mpeg/XingTag.d.ts +7 -6
  104. package/node_modules/music-metadata/lib/mpeg/XingTag.js +18 -14
  105. package/node_modules/music-metadata/lib/musepack/index.d.ts +5 -0
  106. package/node_modules/music-metadata/lib/musepack/index.js +32 -0
  107. package/node_modules/music-metadata/lib/musepack/sv7/BitReader.d.ts +2 -2
  108. package/node_modules/music-metadata/lib/musepack/sv7/BitReader.js +24 -16
  109. package/node_modules/music-metadata/lib/musepack/sv7/MpcSv7Parser.d.ts +1 -1
  110. package/node_modules/music-metadata/lib/musepack/sv7/MpcSv7Parser.js +15 -16
  111. package/node_modules/music-metadata/lib/musepack/sv7/StreamVersion7.d.ts +1 -1
  112. package/node_modules/music-metadata/lib/musepack/sv7/StreamVersion7.js +7 -5
  113. package/node_modules/music-metadata/lib/musepack/sv8/MpcSv8Parser.d.ts +1 -1
  114. package/node_modules/music-metadata/lib/musepack/sv8/MpcSv8Parser.js +17 -18
  115. package/node_modules/music-metadata/lib/musepack/sv8/StreamVersion8.d.ts +3 -5
  116. package/node_modules/music-metadata/lib/musepack/sv8/StreamVersion8.js +12 -14
  117. package/node_modules/music-metadata/lib/ogg/{OggToken.d.ts → Ogg.d.ts} +6 -17
  118. package/node_modules/music-metadata/lib/ogg/Ogg.js +2 -0
  119. package/node_modules/music-metadata/lib/ogg/OggParser.d.ts +12 -16
  120. package/node_modules/music-metadata/lib/ogg/OggParser.js +102 -101
  121. package/node_modules/music-metadata/lib/ogg/opus/Opus.d.ts +2 -17
  122. package/node_modules/music-metadata/lib/ogg/opus/Opus.js +14 -13
  123. package/node_modules/music-metadata/lib/ogg/opus/OpusParser.d.ts +25 -0
  124. package/node_modules/music-metadata/lib/ogg/opus/{OpusStream.js → OpusParser.js} +18 -18
  125. package/node_modules/music-metadata/lib/ogg/speex/Speex.d.ts +1 -1
  126. package/node_modules/music-metadata/lib/ogg/speex/Speex.js +19 -16
  127. package/node_modules/music-metadata/lib/ogg/speex/SpeexParser.d.ts +22 -0
  128. package/node_modules/music-metadata/lib/ogg/speex/{SpeexStream.js → SpeexParser.js} +13 -9
  129. package/node_modules/music-metadata/lib/ogg/theora/Theora.d.ts +1 -1
  130. package/node_modules/music-metadata/lib/ogg/theora/Theora.js +11 -8
  131. package/node_modules/music-metadata/lib/ogg/theora/TheoraParser.d.ts +28 -0
  132. package/node_modules/music-metadata/lib/ogg/theora/TheoraParser.js +44 -0
  133. package/node_modules/music-metadata/lib/ogg/vorbis/Vorbis.d.ts +7 -6
  134. package/node_modules/music-metadata/lib/ogg/vorbis/Vorbis.js +29 -34
  135. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.d.ts +1 -1
  136. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.js +9 -6
  137. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisParser.d.ts +36 -0
  138. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisParser.js +128 -0
  139. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisTagMapper.d.ts +3 -3
  140. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisTagMapper.js +9 -5
  141. package/node_modules/music-metadata/lib/riff/RiffChunk.d.ts +5 -5
  142. package/node_modules/music-metadata/lib/riff/RiffChunk.js +9 -5
  143. package/node_modules/music-metadata/lib/riff/RiffInfoTagMap.d.ts +2 -2
  144. package/node_modules/music-metadata/lib/riff/RiffInfoTagMap.js +25 -20
  145. package/node_modules/music-metadata/lib/type.d.ts +52 -121
  146. package/node_modules/music-metadata/lib/type.js +6 -2
  147. package/node_modules/music-metadata/lib/wav/BwfChunk.d.ts +1 -1
  148. package/node_modules/music-metadata/lib/wav/BwfChunk.js +11 -8
  149. package/node_modules/music-metadata/lib/wav/WaveChunk.d.ts +20 -50
  150. package/node_modules/music-metadata/lib/wav/WaveChunk.js +32 -45
  151. package/node_modules/music-metadata/lib/wav/WaveParser.d.ts +2 -2
  152. package/node_modules/music-metadata/lib/wav/WaveParser.js +39 -46
  153. package/node_modules/music-metadata/lib/wavpack/WavPackParser.d.ts +2 -18
  154. package/node_modules/music-metadata/lib/wavpack/WavPackParser.js +32 -42
  155. package/node_modules/music-metadata/lib/wavpack/WavPackToken.d.ts +18 -14
  156. package/node_modules/music-metadata/lib/wavpack/WavPackToken.js +30 -24
  157. package/node_modules/music-metadata/package.json +74 -81
  158. package/package.json +1 -5
  159. package/node_modules/@borewit/text-codec/LICENSE.txt +0 -9
  160. package/node_modules/@borewit/text-codec/README.md +0 -87
  161. package/node_modules/@borewit/text-codec/lib/index.d.ts +0 -6
  162. package/node_modules/@borewit/text-codec/lib/index.js +0 -380
  163. package/node_modules/@borewit/text-codec/package.json +0 -70
  164. package/node_modules/music-metadata/lib/ParseError.d.ts +0 -87
  165. package/node_modules/music-metadata/lib/ParseError.js +0 -38
  166. package/node_modules/music-metadata/lib/aiff/AiffLoader.d.ts +0 -2
  167. package/node_modules/music-metadata/lib/aiff/AiffLoader.js +0 -8
  168. package/node_modules/music-metadata/lib/apev2/Apev2Loader.d.ts +0 -2
  169. package/node_modules/music-metadata/lib/apev2/Apev2Loader.js +0 -8
  170. package/node_modules/music-metadata/lib/asf/AsfGuid.d.ts +0 -83
  171. package/node_modules/music-metadata/lib/asf/AsfGuid.js +0 -109
  172. package/node_modules/music-metadata/lib/asf/AsfLoader.d.ts +0 -2
  173. package/node_modules/music-metadata/lib/asf/AsfLoader.js +0 -8
  174. package/node_modules/music-metadata/lib/dsdiff/DsdiffLoader.d.ts +0 -2
  175. package/node_modules/music-metadata/lib/dsdiff/DsdiffLoader.js +0 -8
  176. package/node_modules/music-metadata/lib/dsf/DsfLoader.d.ts +0 -2
  177. package/node_modules/music-metadata/lib/dsf/DsfLoader.js +0 -8
  178. package/node_modules/music-metadata/lib/ebml/EbmlIterator.d.ts +0 -67
  179. package/node_modules/music-metadata/lib/ebml/EbmlIterator.js +0 -218
  180. package/node_modules/music-metadata/lib/ebml/types.d.ts +0 -37
  181. package/node_modules/music-metadata/lib/ebml/types.js +0 -8
  182. package/node_modules/music-metadata/lib/flac/FlacLoader.d.ts +0 -2
  183. package/node_modules/music-metadata/lib/flac/FlacLoader.js +0 -8
  184. package/node_modules/music-metadata/lib/flac/FlacToken.d.ts +0 -45
  185. package/node_modules/music-metadata/lib/flac/FlacToken.js +0 -63
  186. package/node_modules/music-metadata/lib/id3v2/FrameHeader.d.ts +0 -31
  187. package/node_modules/music-metadata/lib/id3v2/FrameHeader.js +0 -73
  188. package/node_modules/music-metadata/lib/id3v2/ID3v2ChapterToken.d.ts +0 -11
  189. package/node_modules/music-metadata/lib/id3v2/ID3v2ChapterToken.js +0 -17
  190. package/node_modules/music-metadata/lib/lrc/LyricsParser.d.ts +0 -9
  191. package/node_modules/music-metadata/lib/lrc/LyricsParser.js +0 -45
  192. package/node_modules/music-metadata/lib/matroska/MatroskaLoader.d.ts +0 -2
  193. package/node_modules/music-metadata/lib/matroska/MatroskaLoader.js +0 -8
  194. package/node_modules/music-metadata/lib/mp4/Mp4Loader.d.ts +0 -2
  195. package/node_modules/music-metadata/lib/mp4/Mp4Loader.js +0 -8
  196. package/node_modules/music-metadata/lib/mpeg/MpegLoader.d.ts +0 -2
  197. package/node_modules/music-metadata/lib/mpeg/MpegLoader.js +0 -8
  198. package/node_modules/music-metadata/lib/musepack/MusepackConentError.d.ts +0 -15
  199. package/node_modules/music-metadata/lib/musepack/MusepackConentError.js +0 -3
  200. package/node_modules/music-metadata/lib/musepack/MusepackLoader.d.ts +0 -2
  201. package/node_modules/music-metadata/lib/musepack/MusepackLoader.js +0 -8
  202. package/node_modules/music-metadata/lib/musepack/MusepackParser.d.ts +0 -4
  203. package/node_modules/music-metadata/lib/musepack/MusepackParser.js +0 -30
  204. package/node_modules/music-metadata/lib/ogg/OggLoader.d.ts +0 -2
  205. package/node_modules/music-metadata/lib/ogg/OggLoader.js +0 -8
  206. package/node_modules/music-metadata/lib/ogg/OggToken.js +0 -41
  207. package/node_modules/music-metadata/lib/ogg/flac/FlacStream.d.ts +0 -29
  208. package/node_modules/music-metadata/lib/ogg/flac/FlacStream.js +0 -74
  209. package/node_modules/music-metadata/lib/ogg/opus/OpusStream.d.ts +0 -24
  210. package/node_modules/music-metadata/lib/ogg/speex/SpeexStream.d.ts +0 -20
  211. package/node_modules/music-metadata/lib/ogg/theora/TheoraStream.d.ts +0 -25
  212. package/node_modules/music-metadata/lib/ogg/theora/TheoraStream.js +0 -39
  213. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.d.ts +0 -53
  214. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.js +0 -136
  215. package/node_modules/music-metadata/lib/wav/WaveLoader.d.ts +0 -2
  216. package/node_modules/music-metadata/lib/wav/WaveLoader.js +0 -8
  217. package/node_modules/music-metadata/lib/wavpack/WavPackLoader.d.ts +0 -2
  218. package/node_modules/music-metadata/lib/wavpack/WavPackLoader.js +0 -8
  219. package/node_modules/music-metadata/node_modules/file-type/core.d.ts +0 -253
  220. package/node_modules/music-metadata/node_modules/file-type/core.js +0 -2899
  221. package/node_modules/music-metadata/node_modules/file-type/index.d.ts +0 -98
  222. package/node_modules/music-metadata/node_modules/file-type/index.js +0 -163
  223. package/node_modules/music-metadata/node_modules/file-type/license +0 -9
  224. package/node_modules/music-metadata/node_modules/file-type/package.json +0 -290
  225. package/node_modules/music-metadata/node_modules/file-type/readme.md +0 -667
  226. package/node_modules/music-metadata/node_modules/file-type/supported.js +0 -360
  227. package/node_modules/music-metadata/node_modules/file-type/util.js +0 -60
  228. package/node_modules/music-metadata/node_modules/strtok3/LICENSE.txt +0 -21
  229. package/node_modules/music-metadata/node_modules/strtok3/README.md +0 -399
  230. package/node_modules/music-metadata/node_modules/strtok3/lib/AbstractTokenizer.d.ts +0 -76
  231. package/node_modules/music-metadata/node_modules/strtok3/lib/AbstractTokenizer.js +0 -111
  232. package/node_modules/music-metadata/node_modules/strtok3/lib/BlobTokenizer.d.ts +0 -29
  233. package/node_modules/music-metadata/node_modules/strtok3/lib/BlobTokenizer.js +0 -53
  234. package/node_modules/music-metadata/node_modules/strtok3/lib/BufferTokenizer.d.ts +0 -29
  235. package/node_modules/music-metadata/node_modules/strtok3/lib/BufferTokenizer.js +0 -52
  236. package/node_modules/music-metadata/node_modules/strtok3/lib/FileTokenizer.d.ts +0 -37
  237. package/node_modules/music-metadata/node_modules/strtok3/lib/FileTokenizer.js +0 -61
  238. package/node_modules/music-metadata/node_modules/strtok3/lib/ReadStreamTokenizer.d.ts +0 -34
  239. package/node_modules/music-metadata/node_modules/strtok3/lib/ReadStreamTokenizer.js +0 -107
  240. package/node_modules/music-metadata/node_modules/strtok3/lib/core.d.ts +0 -40
  241. package/node_modules/music-metadata/node_modules/strtok3/lib/core.js +0 -62
  242. package/node_modules/music-metadata/node_modules/strtok3/lib/index.d.ts +0 -16
  243. package/node_modules/music-metadata/node_modules/strtok3/lib/index.js +0 -22
  244. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/AbstractStreamReader.d.ts +0 -54
  245. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/AbstractStreamReader.js +0 -71
  246. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/Deferred.d.ts +0 -6
  247. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/Deferred.js +0 -10
  248. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/Errors.d.ts +0 -10
  249. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/Errors.js +0 -16
  250. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/StreamReader.d.ts +0 -29
  251. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/StreamReader.js +0 -83
  252. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/WebStreamByobReader.d.ts +0 -14
  253. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/WebStreamByobReader.js +0 -27
  254. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/WebStreamDefaultReader.d.ts +0 -19
  255. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/WebStreamDefaultReader.js +0 -62
  256. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +0 -14
  257. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/WebStreamReader.js +0 -13
  258. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/WebStreamReaderFactory.d.ts +0 -5
  259. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/WebStreamReaderFactory.js +0 -19
  260. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/index.d.ts +0 -6
  261. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/index.js +0 -5
  262. package/node_modules/music-metadata/node_modules/strtok3/lib/types.d.ts +0 -139
  263. package/node_modules/music-metadata/node_modules/strtok3/lib/types.js +0 -1
  264. package/node_modules/music-metadata/node_modules/strtok3/package.json +0 -94
  265. package/node_modules/music-metadata/node_modules/token-types/LICENSE.txt +0 -9
  266. package/node_modules/music-metadata/node_modules/token-types/README.md +0 -120
  267. package/node_modules/music-metadata/node_modules/token-types/lib/index.d.ts +0 -135
  268. package/node_modules/music-metadata/node_modules/token-types/lib/index.js +0 -401
  269. package/node_modules/music-metadata/node_modules/token-types/package.json +0 -81
  270. package/node_modules/sprintf-js/.npmignore +0 -1
  271. package/node_modules/sprintf-js/LICENSE +0 -24
  272. package/node_modules/sprintf-js/README.md +0 -88
  273. package/node_modules/sprintf-js/bower.json +0 -14
  274. package/node_modules/sprintf-js/demo/angular.html +0 -20
  275. package/node_modules/sprintf-js/dist/angular-sprintf.min.js +0 -4
  276. package/node_modules/sprintf-js/dist/angular-sprintf.min.js.map +0 -1
  277. package/node_modules/sprintf-js/dist/angular-sprintf.min.map +0 -1
  278. package/node_modules/sprintf-js/dist/sprintf.min.js +0 -4
  279. package/node_modules/sprintf-js/dist/sprintf.min.js.map +0 -1
  280. package/node_modules/sprintf-js/dist/sprintf.min.map +0 -1
  281. package/node_modules/sprintf-js/gruntfile.js +0 -36
  282. package/node_modules/sprintf-js/package.json +0 -22
  283. package/node_modules/sprintf-js/src/angular-sprintf.js +0 -18
  284. package/node_modules/sprintf-js/src/sprintf.js +0 -208
  285. package/node_modules/sprintf-js/test/test.js +0 -82
  286. package/node_modules/uint8array-extras/index.d.ts +0 -331
  287. package/node_modules/uint8array-extras/index.js +0 -318
  288. package/node_modules/uint8array-extras/license +0 -9
  289. package/node_modules/uint8array-extras/package.json +0 -54
  290. package/node_modules/uint8array-extras/readme.md +0 -318
  291. package/node_modules/win-guid/LICENSE.txt +0 -9
  292. package/node_modules/win-guid/README.md +0 -113
  293. package/node_modules/win-guid/lib/guid.d.ts +0 -20
  294. package/node_modules/win-guid/lib/guid.js +0 -107
  295. package/node_modules/win-guid/package.json +0 -55
  296. /package/node_modules/{argparse → mammoth/node_modules/argparse}/LICENSE +0 -0
  297. /package/node_modules/{argparse → mammoth/node_modules/argparse}/README.md +0 -0
  298. /package/node_modules/{argparse → mammoth/node_modules/argparse}/index.js +0 -0
  299. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/append/constant.js +0 -0
  300. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/append.js +0 -0
  301. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/count.js +0 -0
  302. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/help.js +0 -0
  303. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/store/constant.js +0 -0
  304. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/store/false.js +0 -0
  305. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/store/true.js +0 -0
  306. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/store.js +0 -0
  307. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/subparsers.js +0 -0
  308. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/version.js +0 -0
  309. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action.js +0 -0
  310. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action_container.js +0 -0
  311. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/argparse.js +0 -0
  312. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/argument/error.js +0 -0
  313. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/argument/exclusive.js +0 -0
  314. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/argument/group.js +0 -0
  315. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/argument_parser.js +0 -0
  316. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/const.js +0 -0
  317. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/help/added_formatters.js +0 -0
  318. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/help/formatter.js +0 -0
  319. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/namespace.js +0 -0
  320. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/utils.js +0 -0
  321. /package/node_modules/{argparse → mammoth/node_modules/argparse}/package.json +0 -0
@@ -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: Uint8Array[], 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, b: Uint8Array): 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, b: Uint8Array): 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, 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): 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, value: Uint8Array): 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, value: Uint8Array): 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,9 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright © 2026 Borewit
4
-
5
- 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:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- 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.
@@ -1,113 +0,0 @@
1
- [![NPM version](https://img.shields.io/npm/v/win-guid.svg)](https://npmjs.org/package/win-guid)
2
- [![Node.js CI](https://github.com/Borewit/win-guid/actions/workflows/nodejs-ci.yml/badge.svg)](https://github.com/Borewit/win-guid/actions/workflows/nodejs-ci.yml)
3
- [![npm downloads](http://img.shields.io/npm/dm/win-guid.svg)](https://npmcharts.com/compare/win-guid?start=365)
4
-
5
- # win-guid
6
-
7
- A module for encoding and decoding **Windows legacy GUIDs** using the **Windows GUID byte layout**,
8
- a mixed-endianness format used by several long-standing Microsoft and firmware standards, including:
9
-
10
- - [Component Object Model (COM)](https://en.wikipedia.org/wiki/Component_Object_Model)
11
- - [Object Linking and Embedding (OLE)](https://en.wikipedia.org/wiki/Object_Linking_and_Embedding)
12
- - [Compound File Binary Format (CFBF, Structured Storage)](https://en.wikipedia.org/wiki/Compound_File_Binary_Format)
13
- - [GUID Partition Table (GPT)](https://en.wikipedia.org/wiki/GUID_Partition_Table)
14
- - [Unified Extensible Firmware Interface (UEFI)](https://en.wikipedia.org/wiki/UEFI)
15
- - [Windows Registry](https://en.wikipedia.org/wiki/Windows_Registry) binary GUID values
16
- - [Active Directory](https://en.wikipedia.org/wiki/Active_Directory) objectGUID values
17
-
18
- This is commonly needed when working with Microsoft file and storage formats, such as `.asf`, `.doc`, `.xls`, `.ppt`,
19
- and other binary formats based on OLE/COM Structured Storage (CFBF),
20
- where GUIDs are stored in Windows byte order rather than [RFC 9562](https://www.rfc-editor.org/rfc/rfc9562.html)-style UUID order.
21
-
22
- ## Windows legacy GUID byte layout vs RFC 9562 UUID byte layout
23
-
24
- The table below shows how GUID `00112233-4455-6677-8899-AABBCCDDEEFF` is serialized as an [RFC 9562](https://www.rfc-editor.org/rfc/rfc9562.html) UUID versus a Windows GUID:
25
-
26
- | UUID / GUID type | Serialized byte layout (hexadecimal) |
27
- |-------------------------|---------------------------------------------------|
28
- | RFC 9562 UUID layout | `00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF` |
29
- | Windows GUID layout | `33 22 11 00 55 44 77 66 88 99 AA BB CC DD EE FF` |
30
-
31
- Windows legacy GUID layout reorders only the first three fields (32-bit, 16-bit, 16-bit). The remaining 8 bytes are stored as-is.
32
-
33
- For [RFC 9562](https://www.rfc-editor.org/rfc/rfc9562.html) compliant UUIDs (network byte order), use [uuid](https://github.com/uuidjs/uuid) instead.
34
-
35
- ## Installation
36
-
37
- ```bash
38
- npm install win-guid
39
- ```
40
-
41
- ## Usage
42
-
43
- ### Parse a GUID string
44
-
45
- Parses a canonical GUID string:
46
- ```js
47
- import { parseWindowsGuid } from "win-guid";
48
-
49
- const bytes = parseWindowsGuid("00020906-0000-0000-C000-000000000046");
50
- ```
51
- into a 16-byte Uint8Array using Windows GUID byte order.
52
- - Input is validated strictly
53
- - Case-insensitive
54
- - Throws an error on invalid input
55
-
56
- ### Use the Guid helper class
57
-
58
- Creates a GUID from a canonical GUID string.
59
- ```js
60
- import { Guid } from "win-guid";
61
-
62
- const guid = Guid.fromString("00020906-0000-0000-C000-000000000046");
63
- ```
64
-
65
- ## API
66
-
67
- `parseWindowsGuid(guid: string): Uint8Array`
68
-
69
- Parses a canonical GUID string:
70
- ```js
71
- const bytes = parseWindowsGuid("00020906-0000-0000-C000-000000000046");
72
- ```
73
-
74
- into a 16-byte `Uint8Array` using Windows GUID byte order.
75
-
76
- - Input is validated strictly
77
- - Case-insensitive
78
- - Throws Error on invalid input
79
-
80
- `class Guid`
81
-
82
- Creates a GUID from a canonical GUID string.
83
-
84
- ```js
85
- const guid = Guid.fromString("00020906-0000-0000-C000-000000000046");
86
- ```
87
-
88
- `guid.toString(): string`
89
-
90
- Converts the GUID back into the canonical string form.
91
-
92
- - Always uppercase
93
- - Round-trips cleanly with fromString
94
-
95
- ```js
96
- guid.toString();
97
- ```
98
- Outputs something like:
99
- ```
100
- 00020906-0000-0000-C000-000000000046`
101
- ```
102
-
103
- `guid.bytes: Uint8Array`
104
-
105
- Provides access to the raw 16-byte GUID in Windows legacy GUID byte order.
106
-
107
- ```js
108
- const bytes = guid.bytes;
109
- ```
110
-
111
- ## Licence
112
-
113
- This project is licensed under the [MIT License](LICENSE.txt). Feel free to use, modify, and distribute as needed.
@@ -1,20 +0,0 @@
1
- /**
2
- * Parse canonical GUID string (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
3
- * into Windows / CFBF byte order.
4
- */
5
- export declare function parseWindowsGuid(guid: string): Uint8Array;
6
- export declare class Guid {
7
- readonly bytes: Uint8Array;
8
- constructor(bytes: Uint8Array);
9
- static fromString(guid: string): Guid;
10
- /**
11
- * Convert Windows / CFBF byte order into canonical GUID string:
12
- * xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
13
- */
14
- toString(): string;
15
- /**
16
- * Compare against a Uint8Array containing GUID bytes
17
- * in Windows / CFBF layout.
18
- */
19
- equals(buf: Uint8Array, offset?: number): boolean;
20
- }
@@ -1,107 +0,0 @@
1
- /**
2
- * Parse canonical GUID string (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
3
- * into Windows / CFBF byte order.
4
- */
5
- export function parseWindowsGuid(guid) {
6
- let s = guid.trim();
7
- // Keep validation readable and strict, avoid lowercasing allocations
8
- if (s.length !== 36 ||
9
- s[8] !== "-" ||
10
- s[13] !== "-" ||
11
- s[18] !== "-" ||
12
- s[23] !== "-") {
13
- throw new Error(`Invalid GUID format: ${guid}`);
14
- }
15
- let v;
16
- const out = new Uint8Array(16);
17
- // Data1: 8 hex, uint32 little-endian
18
- v = parseInt(s.slice(0, 8), 16);
19
- out[0] = v & 0xff;
20
- out[1] = (v >>> 8) & 0xff;
21
- out[2] = (v >>> 16) & 0xff;
22
- out[3] = (v >>> 24) & 0xff;
23
- // Data2: 4 hex, uint16 little-endian
24
- v = parseInt(s.slice(9, 13), 16);
25
- out[4] = v & 0xff;
26
- out[5] = (v >>> 8) & 0xff;
27
- // Data3: 4 hex, uint16 little-endian
28
- v = parseInt(s.slice(14, 18), 16);
29
- out[6] = v & 0xff;
30
- out[7] = (v >>> 8) & 0xff;
31
- // Data4: 4 hex, as-is (string order)
32
- v = parseInt(s.slice(19, 23), 16);
33
- out[8] = (v >>> 8) & 0xff;
34
- out[9] = v & 0xff;
35
- // Data5: 12 hex, 6 bytes, as-is (string order)
36
- // Parse as two chunks to avoid any precision worries, keep it simple.
37
- v = parseInt(s.slice(24, 32), 16); // 8 hex -> 4 bytes
38
- out[10] = (v >>> 24) & 0xff;
39
- out[11] = (v >>> 16) & 0xff;
40
- out[12] = (v >>> 8) & 0xff;
41
- out[13] = v & 0xff;
42
- v = parseInt(s.slice(32, 36), 16); // 4 hex -> 2 bytes
43
- out[14] = (v >>> 8) & 0xff;
44
- out[15] = v & 0xff;
45
- // Ensure all parsed parts were valid hex (parseInt can yield NaN)
46
- for (let i = 0; i < 16; i++) {
47
- if (!Number.isFinite(out[i])) {
48
- throw new Error(`Invalid GUID format: ${guid}`);
49
- }
50
- }
51
- // Also catch NaN early (more useful error locality)
52
- // If any parseInt produced NaN, assignments above would have become 0,
53
- // so instead validate hex characters directly with a lightweight check.
54
- // (Keeps code small while staying strict.)
55
- if (!/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(s)) {
56
- throw new Error(`Invalid GUID format: ${guid}`);
57
- }
58
- return out;
59
- }
60
- export class Guid {
61
- constructor(bytes) {
62
- if (bytes.length !== 16)
63
- throw new Error("GUID must be exactly 16 bytes");
64
- this.bytes = bytes;
65
- }
66
- static fromString(guid) {
67
- return new Guid(parseWindowsGuid(guid));
68
- }
69
- /**
70
- * Convert Windows / CFBF byte order into canonical GUID string:
71
- * xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
72
- */
73
- toString() {
74
- const b = this.bytes;
75
- const hx = (n) => n.toString(16).padStart(2, "0");
76
- // Data1 (uint32 LE) -> big-endian text
77
- const g1 = hx(b[3]) + hx(b[2]) + hx(b[1]) + hx(b[0]);
78
- // Data2 (uint16 LE)
79
- const g2 = hx(b[5]) + hx(b[4]);
80
- // Data3 (uint16 LE)
81
- const g3 = hx(b[7]) + hx(b[6]);
82
- // Data4 (as-is)
83
- const g4 = hx(b[8]) + hx(b[9]);
84
- // Data5 (as-is)
85
- const g5 = hx(b[10]) +
86
- hx(b[11]) +
87
- hx(b[12]) +
88
- hx(b[13]) +
89
- hx(b[14]) +
90
- hx(b[15]);
91
- return `${g1}-${g2}-${g3}-${g4}-${g5}`.toUpperCase();
92
- }
93
- /**
94
- * Compare against a Uint8Array containing GUID bytes
95
- * in Windows / CFBF layout.
96
- */
97
- equals(buf, offset = 0) {
98
- if (offset < 0 || buf.length - offset < 16)
99
- return false;
100
- const a = this.bytes;
101
- for (let i = 0; i < 16; i++) {
102
- if (buf[offset + i] !== a[i])
103
- return false;
104
- }
105
- return true;
106
- }
107
- }
@@ -1,55 +0,0 @@
1
- {
2
- "name": "win-guid",
3
- "version": "0.2.1",
4
- "description": "Windows legacy GUID parser",
5
- "type": "module",
6
- "exports": "./lib/guid.js",
7
- "scripts": {
8
- "clean": "del-cli 'lib/**/*.js' 'lib/**/*.js.map' 'lib/**/*.d.ts' 'src/**/*.d.ts'",
9
- "compile-src": "tsc -p lib",
10
- "compile": "yarn run compile-src",
11
- "format": "biome format",
12
- "lint:ts": "biome check",
13
- "build": "yarn run clean && yarn run compile",
14
- "test": "mocha",
15
- "prepublishOnly": "yarn run build",
16
- "update-biome": "yarn add -D --exact @biomejs/biome && npx @biomejs/biome migrate --write"
17
- },
18
- "files": [
19
- "lib/**/*.js",
20
- "lib/**/*.d.ts",
21
- "lib/*.cjs"
22
- ],
23
- "author": {
24
- "name": "Borewit",
25
- "url": "https://github.com/Borewit"
26
- },
27
- "repository": {
28
- "type": "git",
29
- "url": "git+https://github.com/Borewit/win-guid.git"
30
- },
31
- "license": "MIT",
32
- "devDependencies": {
33
- "@types/chai": "^5.2.3",
34
- "@types/mocha": "^10.0.10",
35
- "biome": "^0.3.3",
36
- "chai": "^6.2.2",
37
- "del-cli": "^7.0.0",
38
- "mocha": "^11.7.5",
39
- "typescript": "^5.9.3"
40
- },
41
- "packageManager": "yarn@4.9.1",
42
- "keywords": [
43
- "GUID",
44
- "Windows",
45
- "COM",
46
- "CFBF",
47
- "registry",
48
- "UEFI",
49
- "objectGUID",
50
- "GPT",
51
- "endianness",
52
- "OLE",
53
- "binary"
54
- ]
55
- }