fontconv 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (355) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +71 -0
  3. package/esm/_dnt.shims.d.ts +5 -0
  4. package/esm/_dnt.shims.js +61 -0
  5. package/esm/deps/deno.land/std@0.221.0/assert/assert.d.ts +12 -0
  6. package/esm/deps/deno.land/std@0.221.0/assert/assert.js +18 -0
  7. package/esm/deps/deno.land/std@0.221.0/assert/assertion_error.d.ts +14 -0
  8. package/esm/deps/deno.land/std@0.221.0/assert/assertion_error.js +18 -0
  9. package/esm/deps/deno.land/std@0.221.0/path/_common/assert_path.d.ts +1 -0
  10. package/esm/deps/deno.land/std@0.221.0/path/_common/assert_path.js +7 -0
  11. package/esm/deps/deno.land/std@0.221.0/path/_common/basename.d.ts +3 -0
  12. package/esm/deps/deno.land/std@0.221.0/path/_common/basename.js +40 -0
  13. package/esm/deps/deno.land/std@0.221.0/path/_common/common.d.ts +1 -0
  14. package/esm/deps/deno.land/std@0.221.0/path/_common/common.js +23 -0
  15. package/esm/deps/deno.land/std@0.221.0/path/_common/constants.d.ts +39 -0
  16. package/esm/deps/deno.land/std@0.221.0/path/_common/constants.js +46 -0
  17. package/esm/deps/deno.land/std@0.221.0/path/_common/dirname.d.ts +1 -0
  18. package/esm/deps/deno.land/std@0.221.0/path/_common/dirname.js +8 -0
  19. package/esm/deps/deno.land/std@0.221.0/path/_common/format.d.ts +3 -0
  20. package/esm/deps/deno.land/std@0.221.0/path/_common/format.js +19 -0
  21. package/esm/deps/deno.land/std@0.221.0/path/_common/from_file_url.d.ts +2 -0
  22. package/esm/deps/deno.land/std@0.221.0/path/_common/from_file_url.js +9 -0
  23. package/esm/deps/deno.land/std@0.221.0/path/_common/glob_to_reg_exp.d.ts +28 -0
  24. package/esm/deps/deno.land/std@0.221.0/path/_common/glob_to_reg_exp.js +237 -0
  25. package/esm/deps/deno.land/std@0.221.0/path/_common/normalize.d.ts +1 -0
  26. package/esm/deps/deno.land/std@0.221.0/path/_common/normalize.js +8 -0
  27. package/esm/deps/deno.land/std@0.221.0/path/_common/normalize_string.d.ts +1 -0
  28. package/esm/deps/deno.land/std@0.221.0/path/_common/normalize_string.js +77 -0
  29. package/esm/deps/deno.land/std@0.221.0/path/_common/relative.d.ts +1 -0
  30. package/esm/deps/deno.land/std@0.221.0/path/_common/relative.js +9 -0
  31. package/esm/deps/deno.land/std@0.221.0/path/_common/strip_trailing_separators.d.ts +1 -0
  32. package/esm/deps/deno.land/std@0.221.0/path/_common/strip_trailing_separators.js +19 -0
  33. package/esm/deps/deno.land/std@0.221.0/path/_common/to_file_url.d.ts +1 -0
  34. package/esm/deps/deno.land/std@0.221.0/path/_common/to_file_url.js +15 -0
  35. package/esm/deps/deno.land/std@0.221.0/path/_interface.d.ts +38 -0
  36. package/esm/deps/deno.land/std@0.221.0/path/_interface.js +3 -0
  37. package/esm/deps/deno.land/std@0.221.0/path/_os.d.ts +3 -0
  38. package/esm/deps/deno.land/std@0.221.0/path/_os.js +18 -0
  39. package/esm/deps/deno.land/std@0.221.0/path/basename.d.ts +17 -0
  40. package/esm/deps/deno.land/std@0.221.0/path/basename.js +26 -0
  41. package/esm/deps/deno.land/std@0.221.0/path/common.d.ts +13 -0
  42. package/esm/deps/deno.land/std@0.221.0/path/common.js +19 -0
  43. package/esm/deps/deno.land/std@0.221.0/path/constants.d.ts +3 -0
  44. package/esm/deps/deno.land/std@0.221.0/path/constants.js +6 -0
  45. package/esm/deps/deno.land/std@0.221.0/path/dirname.d.ts +5 -0
  46. package/esm/deps/deno.land/std@0.221.0/path/dirname.js +12 -0
  47. package/esm/deps/deno.land/std@0.221.0/path/extname.d.ts +6 -0
  48. package/esm/deps/deno.land/std@0.221.0/path/extname.js +13 -0
  49. package/esm/deps/deno.land/std@0.221.0/path/format.d.ts +8 -0
  50. package/esm/deps/deno.land/std@0.221.0/path/format.js +14 -0
  51. package/esm/deps/deno.land/std@0.221.0/path/from_file_url.d.ts +18 -0
  52. package/esm/deps/deno.land/std@0.221.0/path/from_file_url.js +24 -0
  53. package/esm/deps/deno.land/std@0.221.0/path/glob_to_regexp.d.ts +62 -0
  54. package/esm/deps/deno.land/std@0.221.0/path/glob_to_regexp.js +65 -0
  55. package/esm/deps/deno.land/std@0.221.0/path/is_absolute.d.ts +5 -0
  56. package/esm/deps/deno.land/std@0.221.0/path/is_absolute.js +12 -0
  57. package/esm/deps/deno.land/std@0.221.0/path/is_glob.d.ts +2 -0
  58. package/esm/deps/deno.land/std@0.221.0/path/is_glob.js +28 -0
  59. package/esm/deps/deno.land/std@0.221.0/path/join.d.ts +5 -0
  60. package/esm/deps/deno.land/std@0.221.0/path/join.js +12 -0
  61. package/esm/deps/deno.land/std@0.221.0/path/join_globs.d.ts +4 -0
  62. package/esm/deps/deno.land/std@0.221.0/path/join_globs.js +11 -0
  63. package/esm/deps/deno.land/std@0.221.0/path/mod.d.ts +56 -0
  64. package/esm/deps/deno.land/std@0.221.0/path/mod.js +60 -0
  65. package/esm/deps/deno.land/std@0.221.0/path/normalize.d.ts +7 -0
  66. package/esm/deps/deno.land/std@0.221.0/path/normalize.js +14 -0
  67. package/esm/deps/deno.land/std@0.221.0/path/normalize_glob.d.ts +4 -0
  68. package/esm/deps/deno.land/std@0.221.0/path/normalize_glob.js +11 -0
  69. package/esm/deps/deno.land/std@0.221.0/path/parse.d.ts +18 -0
  70. package/esm/deps/deno.land/std@0.221.0/path/parse.js +24 -0
  71. package/esm/deps/deno.land/std@0.221.0/path/posix/_util.d.ts +1 -0
  72. package/esm/deps/deno.land/std@0.221.0/path/posix/_util.js +8 -0
  73. package/esm/deps/deno.land/std@0.221.0/path/posix/basename.d.ts +17 -0
  74. package/esm/deps/deno.land/std@0.221.0/path/posix/basename.js +27 -0
  75. package/esm/deps/deno.land/std@0.221.0/path/posix/common.d.ts +13 -0
  76. package/esm/deps/deno.land/std@0.221.0/path/posix/common.js +19 -0
  77. package/esm/deps/deno.land/std@0.221.0/path/posix/constants.d.ts +3 -0
  78. package/esm/deps/deno.land/std@0.221.0/path/posix/constants.js +5 -0
  79. package/esm/deps/deno.land/std@0.221.0/path/posix/dirname.d.ts +14 -0
  80. package/esm/deps/deno.land/std@0.221.0/path/posix/dirname.js +45 -0
  81. package/esm/deps/deno.land/std@0.221.0/path/posix/extname.d.ts +15 -0
  82. package/esm/deps/deno.land/std@0.221.0/path/posix/extname.js +68 -0
  83. package/esm/deps/deno.land/std@0.221.0/path/posix/format.d.ts +6 -0
  84. package/esm/deps/deno.land/std@0.221.0/path/posix/format.js +11 -0
  85. package/esm/deps/deno.land/std@0.221.0/path/posix/from_file_url.d.ts +12 -0
  86. package/esm/deps/deno.land/std@0.221.0/path/posix/from_file_url.js +17 -0
  87. package/esm/deps/deno.land/std@0.221.0/path/posix/glob_to_regexp.d.ts +57 -0
  88. package/esm/deps/deno.land/std@0.221.0/path/posix/glob_to_regexp.js +69 -0
  89. package/esm/deps/deno.land/std@0.221.0/path/posix/is_absolute.d.ts +5 -0
  90. package/esm/deps/deno.land/std@0.221.0/path/posix/is_absolute.js +12 -0
  91. package/esm/deps/deno.land/std@0.221.0/path/posix/is_glob.d.ts +1 -0
  92. package/esm/deps/deno.land/std@0.221.0/path/posix/is_glob.js +3 -0
  93. package/esm/deps/deno.land/std@0.221.0/path/posix/join.d.ts +5 -0
  94. package/esm/deps/deno.land/std@0.221.0/path/posix/join.js +26 -0
  95. package/esm/deps/deno.land/std@0.221.0/path/posix/join_globs.d.ts +4 -0
  96. package/esm/deps/deno.land/std@0.221.0/path/posix/join_globs.js +26 -0
  97. package/esm/deps/deno.land/std@0.221.0/path/posix/mod.d.ts +38 -0
  98. package/esm/deps/deno.land/std@0.221.0/path/posix/mod.js +42 -0
  99. package/esm/deps/deno.land/std@0.221.0/path/posix/normalize.d.ts +7 -0
  100. package/esm/deps/deno.land/std@0.221.0/path/posix/normalize.js +25 -0
  101. package/esm/deps/deno.land/std@0.221.0/path/posix/normalize_glob.d.ts +4 -0
  102. package/esm/deps/deno.land/std@0.221.0/path/posix/normalize_glob.js +16 -0
  103. package/esm/deps/deno.land/std@0.221.0/path/posix/parse.d.ts +6 -0
  104. package/esm/deps/deno.land/std@0.221.0/path/posix/parse.js +98 -0
  105. package/esm/deps/deno.land/std@0.221.0/path/posix/relative.d.ts +7 -0
  106. package/esm/deps/deno.land/std@0.221.0/path/posix/relative.js +94 -0
  107. package/esm/deps/deno.land/std@0.221.0/path/posix/resolve.d.ts +5 -0
  108. package/esm/deps/deno.land/std@0.221.0/path/posix/resolve.js +48 -0
  109. package/esm/deps/deno.land/std@0.221.0/path/posix/to_file_url.d.ts +12 -0
  110. package/esm/deps/deno.land/std@0.221.0/path/posix/to_file_url.js +22 -0
  111. package/esm/deps/deno.land/std@0.221.0/path/posix/to_namespaced_path.d.ts +5 -0
  112. package/esm/deps/deno.land/std@0.221.0/path/posix/to_namespaced_path.js +10 -0
  113. package/esm/deps/deno.land/std@0.221.0/path/relative.d.ts +12 -0
  114. package/esm/deps/deno.land/std@0.221.0/path/relative.js +19 -0
  115. package/esm/deps/deno.land/std@0.221.0/path/resolve.d.ts +5 -0
  116. package/esm/deps/deno.land/std@0.221.0/path/resolve.js +14 -0
  117. package/esm/deps/deno.land/std@0.221.0/path/to_file_url.d.ts +18 -0
  118. package/esm/deps/deno.land/std@0.221.0/path/to_file_url.js +24 -0
  119. package/esm/deps/deno.land/std@0.221.0/path/to_namespaced_path.d.ts +5 -0
  120. package/esm/deps/deno.land/std@0.221.0/path/to_namespaced_path.js +14 -0
  121. package/esm/deps/deno.land/std@0.221.0/path/windows/_util.d.ts +3 -0
  122. package/esm/deps/deno.land/std@0.221.0/path/windows/_util.js +15 -0
  123. package/esm/deps/deno.land/std@0.221.0/path/windows/basename.d.ts +17 -0
  124. package/esm/deps/deno.land/std@0.221.0/path/windows/basename.js +39 -0
  125. package/esm/deps/deno.land/std@0.221.0/path/windows/common.d.ts +13 -0
  126. package/esm/deps/deno.land/std@0.221.0/path/windows/common.js +19 -0
  127. package/esm/deps/deno.land/std@0.221.0/path/windows/constants.d.ts +3 -0
  128. package/esm/deps/deno.land/std@0.221.0/path/windows/constants.js +5 -0
  129. package/esm/deps/deno.land/std@0.221.0/path/windows/dirname.d.ts +5 -0
  130. package/esm/deps/deno.land/std@0.221.0/path/windows/dirname.js +98 -0
  131. package/esm/deps/deno.land/std@0.221.0/path/windows/extname.d.ts +6 -0
  132. package/esm/deps/deno.land/std@0.221.0/path/windows/extname.js +68 -0
  133. package/esm/deps/deno.land/std@0.221.0/path/windows/format.d.ts +6 -0
  134. package/esm/deps/deno.land/std@0.221.0/path/windows/format.js +11 -0
  135. package/esm/deps/deno.land/std@0.221.0/path/windows/from_file_url.d.ts +14 -0
  136. package/esm/deps/deno.land/std@0.221.0/path/windows/from_file_url.js +26 -0
  137. package/esm/deps/deno.land/std@0.221.0/path/windows/glob_to_regexp.d.ts +57 -0
  138. package/esm/deps/deno.land/std@0.221.0/path/windows/glob_to_regexp.js +69 -0
  139. package/esm/deps/deno.land/std@0.221.0/path/windows/is_absolute.d.ts +5 -0
  140. package/esm/deps/deno.land/std@0.221.0/path/windows/is_absolute.js +27 -0
  141. package/esm/deps/deno.land/std@0.221.0/path/windows/is_glob.d.ts +1 -0
  142. package/esm/deps/deno.land/std@0.221.0/path/windows/is_glob.js +3 -0
  143. package/esm/deps/deno.land/std@0.221.0/path/windows/join.d.ts +5 -0
  144. package/esm/deps/deno.land/std@0.221.0/path/windows/join.js +72 -0
  145. package/esm/deps/deno.land/std@0.221.0/path/windows/join_globs.d.ts +4 -0
  146. package/esm/deps/deno.land/std@0.221.0/path/windows/join_globs.js +26 -0
  147. package/esm/deps/deno.land/std@0.221.0/path/windows/mod.d.ts +38 -0
  148. package/esm/deps/deno.land/std@0.221.0/path/windows/mod.js +42 -0
  149. package/esm/deps/deno.land/std@0.221.0/path/windows/normalize.d.ts +7 -0
  150. package/esm/deps/deno.land/std@0.221.0/path/windows/normalize.js +130 -0
  151. package/esm/deps/deno.land/std@0.221.0/path/windows/normalize_glob.d.ts +4 -0
  152. package/esm/deps/deno.land/std@0.221.0/path/windows/normalize_glob.js +16 -0
  153. package/esm/deps/deno.land/std@0.221.0/path/windows/parse.d.ts +6 -0
  154. package/esm/deps/deno.land/std@0.221.0/path/windows/parse.js +159 -0
  155. package/esm/deps/deno.land/std@0.221.0/path/windows/relative.d.ts +12 -0
  156. package/esm/deps/deno.land/std@0.221.0/path/windows/relative.js +121 -0
  157. package/esm/deps/deno.land/std@0.221.0/path/windows/resolve.d.ts +5 -0
  158. package/esm/deps/deno.land/std@0.221.0/path/windows/resolve.js +143 -0
  159. package/esm/deps/deno.land/std@0.221.0/path/windows/to_file_url.d.ts +14 -0
  160. package/esm/deps/deno.land/std@0.221.0/path/windows/to_file_url.js +31 -0
  161. package/esm/deps/deno.land/std@0.221.0/path/windows/to_namespaced_path.d.ts +5 -0
  162. package/esm/deps/deno.land/std@0.221.0/path/windows/to_namespaced_path.js +38 -0
  163. package/esm/fontconv/cli.d.ts +2 -0
  164. package/esm/fontconv/cli.js +36 -0
  165. package/esm/fontconv/mod.d.ts +10 -0
  166. package/esm/fontconv/mod.js +147 -0
  167. package/esm/fontconv/test.d.ts +1 -0
  168. package/esm/package.json +3 -0
  169. package/esm/test/bootstrap-icons.woff2 +0 -0
  170. package/esm/test/format-check.eot +0 -0
  171. package/esm/test/format-check.otf +0 -0
  172. package/esm/test/format-check.svg +25 -0
  173. package/esm/test/format-check.ttf +0 -0
  174. package/esm/test/format-check.woff +0 -0
  175. package/esm/test/format-check.woff2 +0 -0
  176. package/esm/test/material-icons.woff2 +0 -0
  177. package/esm/ttf2svg/mod.d.ts +9 -0
  178. package/esm/ttf2svg/mod.js +167 -0
  179. package/package.json +42 -0
  180. package/script/_dnt.shims.d.ts +5 -0
  181. package/script/_dnt.shims.js +65 -0
  182. package/script/deps/deno.land/std@0.221.0/assert/assert.d.ts +12 -0
  183. package/script/deps/deno.land/std@0.221.0/assert/assert.js +22 -0
  184. package/script/deps/deno.land/std@0.221.0/assert/assertion_error.d.ts +14 -0
  185. package/script/deps/deno.land/std@0.221.0/assert/assertion_error.js +22 -0
  186. package/script/deps/deno.land/std@0.221.0/path/_common/assert_path.d.ts +1 -0
  187. package/script/deps/deno.land/std@0.221.0/path/_common/assert_path.js +11 -0
  188. package/script/deps/deno.land/std@0.221.0/path/_common/basename.d.ts +3 -0
  189. package/script/deps/deno.land/std@0.221.0/path/_common/basename.js +46 -0
  190. package/script/deps/deno.land/std@0.221.0/path/_common/common.d.ts +1 -0
  191. package/script/deps/deno.land/std@0.221.0/path/_common/common.js +27 -0
  192. package/script/deps/deno.land/std@0.221.0/path/_common/constants.d.ts +39 -0
  193. package/script/deps/deno.land/std@0.221.0/path/_common/constants.js +49 -0
  194. package/script/deps/deno.land/std@0.221.0/path/_common/dirname.d.ts +1 -0
  195. package/script/deps/deno.land/std@0.221.0/path/_common/dirname.js +12 -0
  196. package/script/deps/deno.land/std@0.221.0/path/_common/format.d.ts +3 -0
  197. package/script/deps/deno.land/std@0.221.0/path/_common/format.js +24 -0
  198. package/script/deps/deno.land/std@0.221.0/path/_common/from_file_url.d.ts +2 -0
  199. package/script/deps/deno.land/std@0.221.0/path/_common/from_file_url.js +13 -0
  200. package/script/deps/deno.land/std@0.221.0/path/_common/glob_to_reg_exp.d.ts +28 -0
  201. package/script/deps/deno.land/std@0.221.0/path/_common/glob_to_reg_exp.js +241 -0
  202. package/script/deps/deno.land/std@0.221.0/path/_common/normalize.d.ts +1 -0
  203. package/script/deps/deno.land/std@0.221.0/path/_common/normalize.js +12 -0
  204. package/script/deps/deno.land/std@0.221.0/path/_common/normalize_string.d.ts +1 -0
  205. package/script/deps/deno.land/std@0.221.0/path/_common/normalize_string.js +81 -0
  206. package/script/deps/deno.land/std@0.221.0/path/_common/relative.d.ts +1 -0
  207. package/script/deps/deno.land/std@0.221.0/path/_common/relative.js +13 -0
  208. package/script/deps/deno.land/std@0.221.0/path/_common/strip_trailing_separators.d.ts +1 -0
  209. package/script/deps/deno.land/std@0.221.0/path/_common/strip_trailing_separators.js +23 -0
  210. package/script/deps/deno.land/std@0.221.0/path/_common/to_file_url.d.ts +1 -0
  211. package/script/deps/deno.land/std@0.221.0/path/_common/to_file_url.js +19 -0
  212. package/script/deps/deno.land/std@0.221.0/path/_interface.d.ts +38 -0
  213. package/script/deps/deno.land/std@0.221.0/path/_interface.js +4 -0
  214. package/script/deps/deno.land/std@0.221.0/path/_os.d.ts +3 -0
  215. package/script/deps/deno.land/std@0.221.0/path/_os.js +44 -0
  216. package/script/deps/deno.land/std@0.221.0/path/basename.d.ts +17 -0
  217. package/script/deps/deno.land/std@0.221.0/path/basename.js +30 -0
  218. package/script/deps/deno.land/std@0.221.0/path/common.d.ts +13 -0
  219. package/script/deps/deno.land/std@0.221.0/path/common.js +23 -0
  220. package/script/deps/deno.land/std@0.221.0/path/constants.d.ts +3 -0
  221. package/script/deps/deno.land/std@0.221.0/path/constants.js +9 -0
  222. package/script/deps/deno.land/std@0.221.0/path/dirname.d.ts +5 -0
  223. package/script/deps/deno.land/std@0.221.0/path/dirname.js +16 -0
  224. package/script/deps/deno.land/std@0.221.0/path/extname.d.ts +6 -0
  225. package/script/deps/deno.land/std@0.221.0/path/extname.js +17 -0
  226. package/script/deps/deno.land/std@0.221.0/path/format.d.ts +8 -0
  227. package/script/deps/deno.land/std@0.221.0/path/format.js +18 -0
  228. package/script/deps/deno.land/std@0.221.0/path/from_file_url.d.ts +18 -0
  229. package/script/deps/deno.land/std@0.221.0/path/from_file_url.js +28 -0
  230. package/script/deps/deno.land/std@0.221.0/path/glob_to_regexp.d.ts +62 -0
  231. package/script/deps/deno.land/std@0.221.0/path/glob_to_regexp.js +69 -0
  232. package/script/deps/deno.land/std@0.221.0/path/is_absolute.d.ts +5 -0
  233. package/script/deps/deno.land/std@0.221.0/path/is_absolute.js +16 -0
  234. package/script/deps/deno.land/std@0.221.0/path/is_glob.d.ts +2 -0
  235. package/script/deps/deno.land/std@0.221.0/path/is_glob.js +32 -0
  236. package/script/deps/deno.land/std@0.221.0/path/join.d.ts +5 -0
  237. package/script/deps/deno.land/std@0.221.0/path/join.js +16 -0
  238. package/script/deps/deno.land/std@0.221.0/path/join_globs.d.ts +4 -0
  239. package/script/deps/deno.land/std@0.221.0/path/join_globs.js +15 -0
  240. package/script/deps/deno.land/std@0.221.0/path/mod.d.ts +56 -0
  241. package/script/deps/deno.land/std@0.221.0/path/mod.js +89 -0
  242. package/script/deps/deno.land/std@0.221.0/path/normalize.d.ts +7 -0
  243. package/script/deps/deno.land/std@0.221.0/path/normalize.js +18 -0
  244. package/script/deps/deno.land/std@0.221.0/path/normalize_glob.d.ts +4 -0
  245. package/script/deps/deno.land/std@0.221.0/path/normalize_glob.js +15 -0
  246. package/script/deps/deno.land/std@0.221.0/path/parse.d.ts +18 -0
  247. package/script/deps/deno.land/std@0.221.0/path/parse.js +28 -0
  248. package/script/deps/deno.land/std@0.221.0/path/posix/_util.d.ts +1 -0
  249. package/script/deps/deno.land/std@0.221.0/path/posix/_util.js +12 -0
  250. package/script/deps/deno.land/std@0.221.0/path/posix/basename.d.ts +17 -0
  251. package/script/deps/deno.land/std@0.221.0/path/posix/basename.js +31 -0
  252. package/script/deps/deno.land/std@0.221.0/path/posix/common.d.ts +13 -0
  253. package/script/deps/deno.land/std@0.221.0/path/posix/common.js +23 -0
  254. package/script/deps/deno.land/std@0.221.0/path/posix/constants.d.ts +3 -0
  255. package/script/deps/deno.land/std@0.221.0/path/posix/constants.js +8 -0
  256. package/script/deps/deno.land/std@0.221.0/path/posix/dirname.d.ts +14 -0
  257. package/script/deps/deno.land/std@0.221.0/path/posix/dirname.js +49 -0
  258. package/script/deps/deno.land/std@0.221.0/path/posix/extname.d.ts +15 -0
  259. package/script/deps/deno.land/std@0.221.0/path/posix/extname.js +72 -0
  260. package/script/deps/deno.land/std@0.221.0/path/posix/format.d.ts +6 -0
  261. package/script/deps/deno.land/std@0.221.0/path/posix/format.js +15 -0
  262. package/script/deps/deno.land/std@0.221.0/path/posix/from_file_url.d.ts +12 -0
  263. package/script/deps/deno.land/std@0.221.0/path/posix/from_file_url.js +21 -0
  264. package/script/deps/deno.land/std@0.221.0/path/posix/glob_to_regexp.d.ts +57 -0
  265. package/script/deps/deno.land/std@0.221.0/path/posix/glob_to_regexp.js +73 -0
  266. package/script/deps/deno.land/std@0.221.0/path/posix/is_absolute.d.ts +5 -0
  267. package/script/deps/deno.land/std@0.221.0/path/posix/is_absolute.js +16 -0
  268. package/script/deps/deno.land/std@0.221.0/path/posix/is_glob.d.ts +1 -0
  269. package/script/deps/deno.land/std@0.221.0/path/posix/is_glob.js +7 -0
  270. package/script/deps/deno.land/std@0.221.0/path/posix/join.d.ts +5 -0
  271. package/script/deps/deno.land/std@0.221.0/path/posix/join.js +30 -0
  272. package/script/deps/deno.land/std@0.221.0/path/posix/join_globs.d.ts +4 -0
  273. package/script/deps/deno.land/std@0.221.0/path/posix/join_globs.js +30 -0
  274. package/script/deps/deno.land/std@0.221.0/path/posix/mod.d.ts +38 -0
  275. package/script/deps/deno.land/std@0.221.0/path/posix/mod.js +58 -0
  276. package/script/deps/deno.land/std@0.221.0/path/posix/normalize.d.ts +7 -0
  277. package/script/deps/deno.land/std@0.221.0/path/posix/normalize.js +29 -0
  278. package/script/deps/deno.land/std@0.221.0/path/posix/normalize_glob.d.ts +4 -0
  279. package/script/deps/deno.land/std@0.221.0/path/posix/normalize_glob.js +20 -0
  280. package/script/deps/deno.land/std@0.221.0/path/posix/parse.d.ts +6 -0
  281. package/script/deps/deno.land/std@0.221.0/path/posix/parse.js +102 -0
  282. package/script/deps/deno.land/std@0.221.0/path/posix/relative.d.ts +7 -0
  283. package/script/deps/deno.land/std@0.221.0/path/posix/relative.js +98 -0
  284. package/script/deps/deno.land/std@0.221.0/path/posix/resolve.d.ts +5 -0
  285. package/script/deps/deno.land/std@0.221.0/path/posix/resolve.js +75 -0
  286. package/script/deps/deno.land/std@0.221.0/path/posix/to_file_url.d.ts +12 -0
  287. package/script/deps/deno.land/std@0.221.0/path/posix/to_file_url.js +26 -0
  288. package/script/deps/deno.land/std@0.221.0/path/posix/to_namespaced_path.d.ts +5 -0
  289. package/script/deps/deno.land/std@0.221.0/path/posix/to_namespaced_path.js +14 -0
  290. package/script/deps/deno.land/std@0.221.0/path/relative.d.ts +12 -0
  291. package/script/deps/deno.land/std@0.221.0/path/relative.js +23 -0
  292. package/script/deps/deno.land/std@0.221.0/path/resolve.d.ts +5 -0
  293. package/script/deps/deno.land/std@0.221.0/path/resolve.js +18 -0
  294. package/script/deps/deno.land/std@0.221.0/path/to_file_url.d.ts +18 -0
  295. package/script/deps/deno.land/std@0.221.0/path/to_file_url.js +28 -0
  296. package/script/deps/deno.land/std@0.221.0/path/to_namespaced_path.d.ts +5 -0
  297. package/script/deps/deno.land/std@0.221.0/path/to_namespaced_path.js +18 -0
  298. package/script/deps/deno.land/std@0.221.0/path/windows/_util.d.ts +3 -0
  299. package/script/deps/deno.land/std@0.221.0/path/windows/_util.js +21 -0
  300. package/script/deps/deno.land/std@0.221.0/path/windows/basename.d.ts +17 -0
  301. package/script/deps/deno.land/std@0.221.0/path/windows/basename.js +43 -0
  302. package/script/deps/deno.land/std@0.221.0/path/windows/common.d.ts +13 -0
  303. package/script/deps/deno.land/std@0.221.0/path/windows/common.js +23 -0
  304. package/script/deps/deno.land/std@0.221.0/path/windows/constants.d.ts +3 -0
  305. package/script/deps/deno.land/std@0.221.0/path/windows/constants.js +8 -0
  306. package/script/deps/deno.land/std@0.221.0/path/windows/dirname.d.ts +5 -0
  307. package/script/deps/deno.land/std@0.221.0/path/windows/dirname.js +102 -0
  308. package/script/deps/deno.land/std@0.221.0/path/windows/extname.d.ts +6 -0
  309. package/script/deps/deno.land/std@0.221.0/path/windows/extname.js +72 -0
  310. package/script/deps/deno.land/std@0.221.0/path/windows/format.d.ts +6 -0
  311. package/script/deps/deno.land/std@0.221.0/path/windows/format.js +15 -0
  312. package/script/deps/deno.land/std@0.221.0/path/windows/from_file_url.d.ts +14 -0
  313. package/script/deps/deno.land/std@0.221.0/path/windows/from_file_url.js +30 -0
  314. package/script/deps/deno.land/std@0.221.0/path/windows/glob_to_regexp.d.ts +57 -0
  315. package/script/deps/deno.land/std@0.221.0/path/windows/glob_to_regexp.js +73 -0
  316. package/script/deps/deno.land/std@0.221.0/path/windows/is_absolute.d.ts +5 -0
  317. package/script/deps/deno.land/std@0.221.0/path/windows/is_absolute.js +31 -0
  318. package/script/deps/deno.land/std@0.221.0/path/windows/is_glob.d.ts +1 -0
  319. package/script/deps/deno.land/std@0.221.0/path/windows/is_glob.js +7 -0
  320. package/script/deps/deno.land/std@0.221.0/path/windows/join.d.ts +5 -0
  321. package/script/deps/deno.land/std@0.221.0/path/windows/join.js +76 -0
  322. package/script/deps/deno.land/std@0.221.0/path/windows/join_globs.d.ts +4 -0
  323. package/script/deps/deno.land/std@0.221.0/path/windows/join_globs.js +30 -0
  324. package/script/deps/deno.land/std@0.221.0/path/windows/mod.d.ts +38 -0
  325. package/script/deps/deno.land/std@0.221.0/path/windows/mod.js +58 -0
  326. package/script/deps/deno.land/std@0.221.0/path/windows/normalize.d.ts +7 -0
  327. package/script/deps/deno.land/std@0.221.0/path/windows/normalize.js +134 -0
  328. package/script/deps/deno.land/std@0.221.0/path/windows/normalize_glob.d.ts +4 -0
  329. package/script/deps/deno.land/std@0.221.0/path/windows/normalize_glob.js +20 -0
  330. package/script/deps/deno.land/std@0.221.0/path/windows/parse.d.ts +6 -0
  331. package/script/deps/deno.land/std@0.221.0/path/windows/parse.js +163 -0
  332. package/script/deps/deno.land/std@0.221.0/path/windows/relative.d.ts +12 -0
  333. package/script/deps/deno.land/std@0.221.0/path/windows/relative.js +125 -0
  334. package/script/deps/deno.land/std@0.221.0/path/windows/resolve.d.ts +5 -0
  335. package/script/deps/deno.land/std@0.221.0/path/windows/resolve.js +170 -0
  336. package/script/deps/deno.land/std@0.221.0/path/windows/to_file_url.d.ts +14 -0
  337. package/script/deps/deno.land/std@0.221.0/path/windows/to_file_url.js +35 -0
  338. package/script/deps/deno.land/std@0.221.0/path/windows/to_namespaced_path.d.ts +5 -0
  339. package/script/deps/deno.land/std@0.221.0/path/windows/to_namespaced_path.js +42 -0
  340. package/script/fontconv/cli.d.ts +2 -0
  341. package/script/fontconv/cli.js +61 -0
  342. package/script/fontconv/mod.d.ts +10 -0
  343. package/script/fontconv/mod.js +186 -0
  344. package/script/fontconv/test.d.ts +1 -0
  345. package/script/package.json +3 -0
  346. package/script/test/bootstrap-icons.woff2 +0 -0
  347. package/script/test/format-check.eot +0 -0
  348. package/script/test/format-check.otf +0 -0
  349. package/script/test/format-check.svg +25 -0
  350. package/script/test/format-check.ttf +0 -0
  351. package/script/test/format-check.woff +0 -0
  352. package/script/test/format-check.woff2 +0 -0
  353. package/script/test/material-icons.woff2 +0 -0
  354. package/script/ttf2svg/mod.d.ts +9 -0
  355. package/script/ttf2svg/mod.js +204 -0
@@ -0,0 +1,237 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ const regExpEscapeChars = [
4
+ "!",
5
+ "$",
6
+ "(",
7
+ ")",
8
+ "*",
9
+ "+",
10
+ ".",
11
+ "=",
12
+ "?",
13
+ "[",
14
+ "\\",
15
+ "^",
16
+ "{",
17
+ "|",
18
+ ];
19
+ const rangeEscapeChars = ["-", "\\", "]"];
20
+ export function _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true,
21
+ // os = osType,
22
+ caseInsensitive = false, } = {}) {
23
+ if (glob === "") {
24
+ return /(?!)/;
25
+ }
26
+ // Remove trailing separators.
27
+ let newLength = glob.length;
28
+ for (; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--)
29
+ ;
30
+ glob = glob.slice(0, newLength);
31
+ let regExpString = "";
32
+ // Terminates correctly. Trust that `j` is incremented every iteration.
33
+ for (let j = 0; j < glob.length;) {
34
+ let segment = "";
35
+ const groupStack = [];
36
+ let inRange = false;
37
+ let inEscape = false;
38
+ let endsWithSep = false;
39
+ let i = j;
40
+ // Terminates with `i` at the non-inclusive end of the current segment.
41
+ for (; i < glob.length && !c.seps.includes(glob[i]); i++) {
42
+ if (inEscape) {
43
+ inEscape = false;
44
+ const escapeChars = inRange ? rangeEscapeChars : regExpEscapeChars;
45
+ segment += escapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i];
46
+ continue;
47
+ }
48
+ if (glob[i] === c.escapePrefix) {
49
+ inEscape = true;
50
+ continue;
51
+ }
52
+ if (glob[i] === "[") {
53
+ if (!inRange) {
54
+ inRange = true;
55
+ segment += "[";
56
+ if (glob[i + 1] === "!") {
57
+ i++;
58
+ segment += "^";
59
+ }
60
+ else if (glob[i + 1] === "^") {
61
+ i++;
62
+ segment += "\\^";
63
+ }
64
+ continue;
65
+ }
66
+ else if (glob[i + 1] === ":") {
67
+ let k = i + 1;
68
+ let value = "";
69
+ while (glob[k + 1] !== undefined && glob[k + 1] !== ":") {
70
+ value += glob[k + 1];
71
+ k++;
72
+ }
73
+ if (glob[k + 1] === ":" && glob[k + 2] === "]") {
74
+ i = k + 2;
75
+ if (value === "alnum")
76
+ segment += "\\dA-Za-z";
77
+ else if (value === "alpha")
78
+ segment += "A-Za-z";
79
+ else if (value === "ascii")
80
+ segment += "\x00-\x7F";
81
+ else if (value === "blank")
82
+ segment += "\t ";
83
+ else if (value === "cntrl")
84
+ segment += "\x00-\x1F\x7F";
85
+ else if (value === "digit")
86
+ segment += "\\d";
87
+ else if (value === "graph")
88
+ segment += "\x21-\x7E";
89
+ else if (value === "lower")
90
+ segment += "a-z";
91
+ else if (value === "print")
92
+ segment += "\x20-\x7E";
93
+ else if (value === "punct") {
94
+ segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~";
95
+ }
96
+ else if (value === "space")
97
+ segment += "\\s\v";
98
+ else if (value === "upper")
99
+ segment += "A-Z";
100
+ else if (value === "word")
101
+ segment += "\\w";
102
+ else if (value === "xdigit")
103
+ segment += "\\dA-Fa-f";
104
+ continue;
105
+ }
106
+ }
107
+ }
108
+ if (glob[i] === "]" && inRange) {
109
+ inRange = false;
110
+ segment += "]";
111
+ continue;
112
+ }
113
+ if (inRange) {
114
+ if (glob[i] === "\\") {
115
+ segment += `\\\\`;
116
+ }
117
+ else {
118
+ segment += glob[i];
119
+ }
120
+ continue;
121
+ }
122
+ if (glob[i] === ")" && groupStack.length > 0 &&
123
+ groupStack[groupStack.length - 1] !== "BRACE") {
124
+ segment += ")";
125
+ const type = groupStack.pop();
126
+ if (type === "!") {
127
+ segment += c.wildcard;
128
+ }
129
+ else if (type !== "@") {
130
+ segment += type;
131
+ }
132
+ continue;
133
+ }
134
+ if (glob[i] === "|" && groupStack.length > 0 &&
135
+ groupStack[groupStack.length - 1] !== "BRACE") {
136
+ segment += "|";
137
+ continue;
138
+ }
139
+ if (glob[i] === "+" && extended && glob[i + 1] === "(") {
140
+ i++;
141
+ groupStack.push("+");
142
+ segment += "(?:";
143
+ continue;
144
+ }
145
+ if (glob[i] === "@" && extended && glob[i + 1] === "(") {
146
+ i++;
147
+ groupStack.push("@");
148
+ segment += "(?:";
149
+ continue;
150
+ }
151
+ if (glob[i] === "?") {
152
+ if (extended && glob[i + 1] === "(") {
153
+ i++;
154
+ groupStack.push("?");
155
+ segment += "(?:";
156
+ }
157
+ else {
158
+ segment += ".";
159
+ }
160
+ continue;
161
+ }
162
+ if (glob[i] === "!" && extended && glob[i + 1] === "(") {
163
+ i++;
164
+ groupStack.push("!");
165
+ segment += "(?!";
166
+ continue;
167
+ }
168
+ if (glob[i] === "{") {
169
+ groupStack.push("BRACE");
170
+ segment += "(?:";
171
+ continue;
172
+ }
173
+ if (glob[i] === "}" && groupStack[groupStack.length - 1] === "BRACE") {
174
+ groupStack.pop();
175
+ segment += ")";
176
+ continue;
177
+ }
178
+ if (glob[i] === "," && groupStack[groupStack.length - 1] === "BRACE") {
179
+ segment += "|";
180
+ continue;
181
+ }
182
+ if (glob[i] === "*") {
183
+ if (extended && glob[i + 1] === "(") {
184
+ i++;
185
+ groupStack.push("*");
186
+ segment += "(?:";
187
+ }
188
+ else {
189
+ const prevChar = glob[i - 1];
190
+ let numStars = 1;
191
+ while (glob[i + 1] === "*") {
192
+ i++;
193
+ numStars++;
194
+ }
195
+ const nextChar = glob[i + 1];
196
+ if (globstarOption && numStars === 2 &&
197
+ [...c.seps, undefined].includes(prevChar) &&
198
+ [...c.seps, undefined].includes(nextChar)) {
199
+ segment += c.globstar;
200
+ endsWithSep = true;
201
+ }
202
+ else {
203
+ segment += c.wildcard;
204
+ }
205
+ }
206
+ continue;
207
+ }
208
+ segment += regExpEscapeChars.includes(glob[i])
209
+ ? `\\${glob[i]}`
210
+ : glob[i];
211
+ }
212
+ // Check for unclosed groups or a dangling backslash.
213
+ if (groupStack.length > 0 || inRange || inEscape) {
214
+ // Parse failure. Take all characters from this segment literally.
215
+ segment = "";
216
+ for (const c of glob.slice(j, i)) {
217
+ segment += regExpEscapeChars.includes(c) ? `\\${c}` : c;
218
+ endsWithSep = false;
219
+ }
220
+ }
221
+ regExpString += segment;
222
+ if (!endsWithSep) {
223
+ regExpString += i < glob.length ? c.sep : c.sepMaybe;
224
+ endsWithSep = true;
225
+ }
226
+ // Terminates with `i` at the start of the next segment.
227
+ while (c.seps.includes(glob[i]))
228
+ i++;
229
+ // Check that the next value of `j` is indeed higher than the current value.
230
+ if (!(i > j)) {
231
+ throw new Error("Assertion failure: i > j (potential infinite loop)");
232
+ }
233
+ j = i;
234
+ }
235
+ regExpString = `^${regExpString}$`;
236
+ return new RegExp(regExpString, caseInsensitive ? "i" : "");
237
+ }
@@ -0,0 +1 @@
1
+ export declare function assertArg(path: string): "." | undefined;
@@ -0,0 +1,8 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { assertPath } from "./assert_path.js";
4
+ export function assertArg(path) {
5
+ assertPath(path);
6
+ if (path.length === 0)
7
+ return ".";
8
+ }
@@ -0,0 +1 @@
1
+ export declare function normalizeString(path: string, allowAboveRoot: boolean, separator: string, isPathSeparator: (code: number) => boolean): string;
@@ -0,0 +1,77 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // Copyright the Browserify authors. MIT License.
3
+ // Ported from https://github.com/browserify/path-browserify/
4
+ // This module is browser compatible.
5
+ import { CHAR_DOT, CHAR_FORWARD_SLASH } from "./constants.js";
6
+ // Resolves . and .. elements in a path with directory names
7
+ export function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
8
+ let res = "";
9
+ let lastSegmentLength = 0;
10
+ let lastSlash = -1;
11
+ let dots = 0;
12
+ let code;
13
+ for (let i = 0; i <= path.length; ++i) {
14
+ if (i < path.length)
15
+ code = path.charCodeAt(i);
16
+ else if (isPathSeparator(code))
17
+ break;
18
+ else
19
+ code = CHAR_FORWARD_SLASH;
20
+ if (isPathSeparator(code)) {
21
+ if (lastSlash === i - 1 || dots === 1) {
22
+ // NOOP
23
+ }
24
+ else if (lastSlash !== i - 1 && dots === 2) {
25
+ if (res.length < 2 ||
26
+ lastSegmentLength !== 2 ||
27
+ res.charCodeAt(res.length - 1) !== CHAR_DOT ||
28
+ res.charCodeAt(res.length - 2) !== CHAR_DOT) {
29
+ if (res.length > 2) {
30
+ const lastSlashIndex = res.lastIndexOf(separator);
31
+ if (lastSlashIndex === -1) {
32
+ res = "";
33
+ lastSegmentLength = 0;
34
+ }
35
+ else {
36
+ res = res.slice(0, lastSlashIndex);
37
+ lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);
38
+ }
39
+ lastSlash = i;
40
+ dots = 0;
41
+ continue;
42
+ }
43
+ else if (res.length === 2 || res.length === 1) {
44
+ res = "";
45
+ lastSegmentLength = 0;
46
+ lastSlash = i;
47
+ dots = 0;
48
+ continue;
49
+ }
50
+ }
51
+ if (allowAboveRoot) {
52
+ if (res.length > 0)
53
+ res += `${separator}..`;
54
+ else
55
+ res = "..";
56
+ lastSegmentLength = 2;
57
+ }
58
+ }
59
+ else {
60
+ if (res.length > 0)
61
+ res += separator + path.slice(lastSlash + 1, i);
62
+ else
63
+ res = path.slice(lastSlash + 1, i);
64
+ lastSegmentLength = i - lastSlash - 1;
65
+ }
66
+ lastSlash = i;
67
+ dots = 0;
68
+ }
69
+ else if (code === CHAR_DOT && dots !== -1) {
70
+ ++dots;
71
+ }
72
+ else {
73
+ dots = -1;
74
+ }
75
+ }
76
+ return res;
77
+ }
@@ -0,0 +1 @@
1
+ export declare function assertArgs(from: string, to: string): "" | undefined;
@@ -0,0 +1,9 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { assertPath } from "./assert_path.js";
4
+ export function assertArgs(from, to) {
5
+ assertPath(from);
6
+ assertPath(to);
7
+ if (from === to)
8
+ return "";
9
+ }
@@ -0,0 +1 @@
1
+ export declare function stripTrailingSeparators(segment: string, isSep: (char: number) => boolean): string;
@@ -0,0 +1,19 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // Copyright the Browserify authors. MIT License.
3
+ // Ported from https://github.com/browserify/path-browserify/
4
+ // This module is browser compatible.
5
+ export function stripTrailingSeparators(segment, isSep) {
6
+ if (segment.length <= 1) {
7
+ return segment;
8
+ }
9
+ let end = segment.length;
10
+ for (let i = segment.length - 1; i > 0; i--) {
11
+ if (isSep(segment.charCodeAt(i))) {
12
+ end = i;
13
+ }
14
+ else {
15
+ break;
16
+ }
17
+ }
18
+ return segment.slice(0, end);
19
+ }
@@ -0,0 +1 @@
1
+ export declare function encodeWhitespace(string: string): string;
@@ -0,0 +1,15 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ const WHITESPACE_ENCODINGS = {
4
+ "\u0009": "%09",
5
+ "\u000A": "%0A",
6
+ "\u000B": "%0B",
7
+ "\u000C": "%0C",
8
+ "\u000D": "%0D",
9
+ "\u0020": "%20",
10
+ };
11
+ export function encodeWhitespace(string) {
12
+ return string.replaceAll(/[\s]/g, (c) => {
13
+ return WHITESPACE_ENCODINGS[c] ?? c;
14
+ });
15
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * A parsed path object generated by path.parse() or consumed by path.format().
3
+ *
4
+ * @example
5
+ * ```ts
6
+ * import { parse } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
7
+ *
8
+ * const parsedPathObj = parse("c:\\path\\dir\\index.html");
9
+ * parsedPathObj.root; // "c:\\"
10
+ * parsedPathObj.dir; // "c:\\path\\dir"
11
+ * parsedPathObj.base; // "index.html"
12
+ * parsedPathObj.ext; // ".html"
13
+ * parsedPathObj.name; // "index"
14
+ * ```
15
+ */
16
+ export interface ParsedPath {
17
+ /**
18
+ * The root of the path such as '/' or 'c:\'
19
+ */
20
+ root: string;
21
+ /**
22
+ * The full directory path of the parent such as '/home/user/dir' or 'c:\path\dir'
23
+ */
24
+ dir: string;
25
+ /**
26
+ * The file name including extension (if any) such as 'index.html'
27
+ */
28
+ base: string;
29
+ /**
30
+ * The file extension (if any) such as '.html'
31
+ */
32
+ ext: string;
33
+ /**
34
+ * The file name without extension (if any) such as 'index'
35
+ */
36
+ name: string;
37
+ }
38
+ export type FormatInputPathObject = Partial<ParsedPath>;
@@ -0,0 +1,3 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ export {};
@@ -0,0 +1,3 @@
1
+ export type OSType = "darwin" | "linux" | "windows" | "freebsd" | "netbsd" | "aix" | "solaris" | "illumos";
2
+ export declare const osType: OSType;
3
+ export declare const isWindows: boolean;
@@ -0,0 +1,18 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ // Keep this up-to-date with Deno.build.os
4
+ import * as dntShim from "../../../../_dnt.shims.js";
5
+ export const osType = (() => {
6
+ // deno-lint-ignore no-explicit-any
7
+ const { Deno } = dntShim.dntGlobalThis;
8
+ if (typeof Deno?.build?.os === "string") {
9
+ return Deno.build.os;
10
+ }
11
+ // deno-lint-ignore no-explicit-any
12
+ const { navigator } = dntShim.dntGlobalThis;
13
+ if (navigator?.appVersion?.includes?.("Win")) {
14
+ return "windows";
15
+ }
16
+ return "linux";
17
+ })();
18
+ export const isWindows = osType === "windows";
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Return the last portion of a `path`.
3
+ * Trailing directory separators are ignored, and optional suffix is removed.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * import { basename } from "https://deno.land/std@$STD_VERSION/path/basename.ts";
8
+ *
9
+ * basename("/home/user/Documents/"); // "Documents"
10
+ * basename("C:\\user\\Documents\\image.png"); // "image.png"
11
+ * basename("/home/user/Documents/image.png", ".png"); // "image"
12
+ * ```
13
+ *
14
+ * @param path - path to extract the name from.
15
+ * @param [suffix] - suffix to remove from extracted name.
16
+ */
17
+ export declare function basename(path: string, suffix?: string): string;
@@ -0,0 +1,26 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { isWindows } from "./_os.js";
4
+ import { basename as posixBasename } from "./posix/basename.js";
5
+ import { basename as windowsBasename } from "./windows/basename.js";
6
+ /**
7
+ * Return the last portion of a `path`.
8
+ * Trailing directory separators are ignored, and optional suffix is removed.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * import { basename } from "https://deno.land/std@$STD_VERSION/path/basename.ts";
13
+ *
14
+ * basename("/home/user/Documents/"); // "Documents"
15
+ * basename("C:\\user\\Documents\\image.png"); // "image.png"
16
+ * basename("/home/user/Documents/image.png", ".png"); // "image"
17
+ * ```
18
+ *
19
+ * @param path - path to extract the name from.
20
+ * @param [suffix] - suffix to remove from extracted name.
21
+ */
22
+ export function basename(path, suffix = "") {
23
+ return isWindows
24
+ ? windowsBasename(path, suffix)
25
+ : posixBasename(path, suffix);
26
+ }
@@ -0,0 +1,13 @@
1
+ /** Determines the common path from a set of paths, using an optional separator,
2
+ * which defaults to the OS default separator.
3
+ *
4
+ * ```ts
5
+ * import { common } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
6
+ * const p = common([
7
+ * "./deno/std/path/mod.ts",
8
+ * "./deno/std/fs/mod.ts",
9
+ * ]);
10
+ * console.log(p); // "./deno/std/"
11
+ * ```
12
+ */
13
+ export declare function common(paths: string[], sep?: string): string;
@@ -0,0 +1,19 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { _common } from "./_common/common.js";
4
+ import { SEPARATOR } from "./constants.js";
5
+ /** Determines the common path from a set of paths, using an optional separator,
6
+ * which defaults to the OS default separator.
7
+ *
8
+ * ```ts
9
+ * import { common } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
10
+ * const p = common([
11
+ * "./deno/std/path/mod.ts",
12
+ * "./deno/std/fs/mod.ts",
13
+ * ]);
14
+ * console.log(p); // "./deno/std/"
15
+ * ```
16
+ */
17
+ export function common(paths, sep = SEPARATOR) {
18
+ return _common(paths, sep);
19
+ }
@@ -0,0 +1,3 @@
1
+ export declare const DELIMITER: ";" | ":";
2
+ export declare const SEPARATOR: "\\" | "/";
3
+ export declare const SEPARATOR_PATTERN: RegExp;
@@ -0,0 +1,6 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { isWindows } from "./_os.js";
4
+ export const DELIMITER = isWindows ? ";" : ":";
5
+ export const SEPARATOR = isWindows ? "\\" : "/";
6
+ export const SEPARATOR_PATTERN = isWindows ? /[\\/]+/ : /\/+/;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Return the directory path of a `path`.
3
+ * @param path - path to extract the directory from.
4
+ */
5
+ export declare function dirname(path: string): string;
@@ -0,0 +1,12 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { isWindows } from "./_os.js";
4
+ import { dirname as posixDirname } from "./posix/dirname.js";
5
+ import { dirname as windowsDirname } from "./windows/dirname.js";
6
+ /**
7
+ * Return the directory path of a `path`.
8
+ * @param path - path to extract the directory from.
9
+ */
10
+ export function dirname(path) {
11
+ return isWindows ? windowsDirname(path) : posixDirname(path);
12
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Return the extension of the `path` with leading period.
3
+ * @param path with extension
4
+ * @returns extension (ex. for `file.ts` returns `.ts`)
5
+ */
6
+ export declare function extname(path: string): string;
@@ -0,0 +1,13 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { isWindows } from "./_os.js";
4
+ import { extname as posixExtname } from "./posix/extname.js";
5
+ import { extname as windowsExtname } from "./windows/extname.js";
6
+ /**
7
+ * Return the extension of the `path` with leading period.
8
+ * @param path with extension
9
+ * @returns extension (ex. for `file.ts` returns `.ts`)
10
+ */
11
+ export function extname(path) {
12
+ return isWindows ? windowsExtname(path) : posixExtname(path);
13
+ }
@@ -0,0 +1,8 @@
1
+ import type { FormatInputPathObject } from "./_interface.js";
2
+ /**
3
+ * Generate a path from `FormatInputPathObject` object. It does the opposite
4
+ * of `parse`.
5
+ *
6
+ * @param pathObject with path
7
+ */
8
+ export declare function format(pathObject: FormatInputPathObject): string;
@@ -0,0 +1,14 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { isWindows } from "./_os.js";
4
+ import { format as posixFormat } from "./posix/format.js";
5
+ import { format as windowsFormat } from "./windows/format.js";
6
+ /**
7
+ * Generate a path from `FormatInputPathObject` object. It does the opposite
8
+ * of `parse`.
9
+ *
10
+ * @param pathObject with path
11
+ */
12
+ export function format(pathObject) {
13
+ return isWindows ? windowsFormat(pathObject) : posixFormat(pathObject);
14
+ }
@@ -0,0 +1,18 @@
1
+ /// <reference types="node" />
2
+ /**
3
+ * Converts a file URL to a path string.
4
+ *
5
+ * ```ts
6
+ * import { fromFileUrl } from "https://deno.land/std@$STD_VERSION/path/from_file_url.ts";
7
+ *
8
+ * // posix
9
+ * fromFileUrl("file:///home/foo"); // "/home/foo"
10
+ *
11
+ * // win32
12
+ * fromFileUrl("file:///home/foo"); // "\\home\\foo"
13
+ * fromFileUrl("file:///C:/Users/foo"); // "C:\\Users\\foo"
14
+ * fromFileUrl("file://localhost/home/foo"); // "\\\\localhost\\home\\foo"
15
+ * ```
16
+ * @param url of a file URL
17
+ */
18
+ export declare function fromFileUrl(url: string | URL): string;
@@ -0,0 +1,24 @@
1
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // This module is browser compatible.
3
+ import { isWindows } from "./_os.js";
4
+ import { fromFileUrl as posixFromFileUrl } from "./posix/from_file_url.js";
5
+ import { fromFileUrl as windowsFromFileUrl } from "./windows/from_file_url.js";
6
+ /**
7
+ * Converts a file URL to a path string.
8
+ *
9
+ * ```ts
10
+ * import { fromFileUrl } from "https://deno.land/std@$STD_VERSION/path/from_file_url.ts";
11
+ *
12
+ * // posix
13
+ * fromFileUrl("file:///home/foo"); // "/home/foo"
14
+ *
15
+ * // win32
16
+ * fromFileUrl("file:///home/foo"); // "\\home\\foo"
17
+ * fromFileUrl("file:///C:/Users/foo"); // "C:\\Users\\foo"
18
+ * fromFileUrl("file://localhost/home/foo"); // "\\\\localhost\\home\\foo"
19
+ * ```
20
+ * @param url of a file URL
21
+ */
22
+ export function fromFileUrl(url) {
23
+ return isWindows ? windowsFromFileUrl(url) : posixFromFileUrl(url);
24
+ }