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.
- package/LICENSE +21 -0
- package/README.md +71 -0
- package/esm/_dnt.shims.d.ts +5 -0
- package/esm/_dnt.shims.js +61 -0
- package/esm/deps/deno.land/std@0.221.0/assert/assert.d.ts +12 -0
- package/esm/deps/deno.land/std@0.221.0/assert/assert.js +18 -0
- package/esm/deps/deno.land/std@0.221.0/assert/assertion_error.d.ts +14 -0
- package/esm/deps/deno.land/std@0.221.0/assert/assertion_error.js +18 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/assert_path.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/assert_path.js +7 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/basename.d.ts +3 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/basename.js +40 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/common.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/common.js +23 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/constants.d.ts +39 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/constants.js +46 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/dirname.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/dirname.js +8 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/format.d.ts +3 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/format.js +19 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/from_file_url.d.ts +2 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/from_file_url.js +9 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/glob_to_reg_exp.d.ts +28 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/glob_to_reg_exp.js +237 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/normalize.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/normalize.js +8 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/normalize_string.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/normalize_string.js +77 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/relative.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/relative.js +9 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/strip_trailing_separators.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/strip_trailing_separators.js +19 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/to_file_url.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/to_file_url.js +15 -0
- package/esm/deps/deno.land/std@0.221.0/path/_interface.d.ts +38 -0
- package/esm/deps/deno.land/std@0.221.0/path/_interface.js +3 -0
- package/esm/deps/deno.land/std@0.221.0/path/_os.d.ts +3 -0
- package/esm/deps/deno.land/std@0.221.0/path/_os.js +18 -0
- package/esm/deps/deno.land/std@0.221.0/path/basename.d.ts +17 -0
- package/esm/deps/deno.land/std@0.221.0/path/basename.js +26 -0
- package/esm/deps/deno.land/std@0.221.0/path/common.d.ts +13 -0
- package/esm/deps/deno.land/std@0.221.0/path/common.js +19 -0
- package/esm/deps/deno.land/std@0.221.0/path/constants.d.ts +3 -0
- package/esm/deps/deno.land/std@0.221.0/path/constants.js +6 -0
- package/esm/deps/deno.land/std@0.221.0/path/dirname.d.ts +5 -0
- package/esm/deps/deno.land/std@0.221.0/path/dirname.js +12 -0
- package/esm/deps/deno.land/std@0.221.0/path/extname.d.ts +6 -0
- package/esm/deps/deno.land/std@0.221.0/path/extname.js +13 -0
- package/esm/deps/deno.land/std@0.221.0/path/format.d.ts +8 -0
- package/esm/deps/deno.land/std@0.221.0/path/format.js +14 -0
- package/esm/deps/deno.land/std@0.221.0/path/from_file_url.d.ts +18 -0
- package/esm/deps/deno.land/std@0.221.0/path/from_file_url.js +24 -0
- package/esm/deps/deno.land/std@0.221.0/path/glob_to_regexp.d.ts +62 -0
- package/esm/deps/deno.land/std@0.221.0/path/glob_to_regexp.js +65 -0
- package/esm/deps/deno.land/std@0.221.0/path/is_absolute.d.ts +5 -0
- package/esm/deps/deno.land/std@0.221.0/path/is_absolute.js +12 -0
- package/esm/deps/deno.land/std@0.221.0/path/is_glob.d.ts +2 -0
- package/esm/deps/deno.land/std@0.221.0/path/is_glob.js +28 -0
- package/esm/deps/deno.land/std@0.221.0/path/join.d.ts +5 -0
- package/esm/deps/deno.land/std@0.221.0/path/join.js +12 -0
- package/esm/deps/deno.land/std@0.221.0/path/join_globs.d.ts +4 -0
- package/esm/deps/deno.land/std@0.221.0/path/join_globs.js +11 -0
- package/esm/deps/deno.land/std@0.221.0/path/mod.d.ts +56 -0
- package/esm/deps/deno.land/std@0.221.0/path/mod.js +60 -0
- package/esm/deps/deno.land/std@0.221.0/path/normalize.d.ts +7 -0
- package/esm/deps/deno.land/std@0.221.0/path/normalize.js +14 -0
- package/esm/deps/deno.land/std@0.221.0/path/normalize_glob.d.ts +4 -0
- package/esm/deps/deno.land/std@0.221.0/path/normalize_glob.js +11 -0
- package/esm/deps/deno.land/std@0.221.0/path/parse.d.ts +18 -0
- package/esm/deps/deno.land/std@0.221.0/path/parse.js +24 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/_util.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/_util.js +8 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/basename.d.ts +17 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/basename.js +27 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/common.d.ts +13 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/common.js +19 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/constants.d.ts +3 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/constants.js +5 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/dirname.d.ts +14 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/dirname.js +45 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/extname.d.ts +15 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/extname.js +68 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/format.d.ts +6 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/format.js +11 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/from_file_url.d.ts +12 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/from_file_url.js +17 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/glob_to_regexp.d.ts +57 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/glob_to_regexp.js +69 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/is_absolute.d.ts +5 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/is_absolute.js +12 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/is_glob.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/is_glob.js +3 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/join.d.ts +5 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/join.js +26 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/join_globs.d.ts +4 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/join_globs.js +26 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/mod.d.ts +38 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/mod.js +42 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/normalize.d.ts +7 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/normalize.js +25 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/normalize_glob.d.ts +4 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/normalize_glob.js +16 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/parse.d.ts +6 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/parse.js +98 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/relative.d.ts +7 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/relative.js +94 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/resolve.d.ts +5 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/resolve.js +48 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/to_file_url.d.ts +12 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/to_file_url.js +22 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/to_namespaced_path.d.ts +5 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/to_namespaced_path.js +10 -0
- package/esm/deps/deno.land/std@0.221.0/path/relative.d.ts +12 -0
- package/esm/deps/deno.land/std@0.221.0/path/relative.js +19 -0
- package/esm/deps/deno.land/std@0.221.0/path/resolve.d.ts +5 -0
- package/esm/deps/deno.land/std@0.221.0/path/resolve.js +14 -0
- package/esm/deps/deno.land/std@0.221.0/path/to_file_url.d.ts +18 -0
- package/esm/deps/deno.land/std@0.221.0/path/to_file_url.js +24 -0
- package/esm/deps/deno.land/std@0.221.0/path/to_namespaced_path.d.ts +5 -0
- package/esm/deps/deno.land/std@0.221.0/path/to_namespaced_path.js +14 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/_util.d.ts +3 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/_util.js +15 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/basename.d.ts +17 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/basename.js +39 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/common.d.ts +13 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/common.js +19 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/constants.d.ts +3 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/constants.js +5 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/dirname.d.ts +5 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/dirname.js +98 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/extname.d.ts +6 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/extname.js +68 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/format.d.ts +6 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/format.js +11 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/from_file_url.d.ts +14 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/from_file_url.js +26 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/glob_to_regexp.d.ts +57 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/glob_to_regexp.js +69 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/is_absolute.d.ts +5 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/is_absolute.js +27 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/is_glob.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/is_glob.js +3 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/join.d.ts +5 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/join.js +72 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/join_globs.d.ts +4 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/join_globs.js +26 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/mod.d.ts +38 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/mod.js +42 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/normalize.d.ts +7 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/normalize.js +130 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/normalize_glob.d.ts +4 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/normalize_glob.js +16 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/parse.d.ts +6 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/parse.js +159 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/relative.d.ts +12 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/relative.js +121 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/resolve.d.ts +5 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/resolve.js +143 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/to_file_url.d.ts +14 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/to_file_url.js +31 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/to_namespaced_path.d.ts +5 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/to_namespaced_path.js +38 -0
- package/esm/fontconv/cli.d.ts +2 -0
- package/esm/fontconv/cli.js +36 -0
- package/esm/fontconv/mod.d.ts +10 -0
- package/esm/fontconv/mod.js +147 -0
- package/esm/fontconv/test.d.ts +1 -0
- package/esm/package.json +3 -0
- package/esm/test/bootstrap-icons.woff2 +0 -0
- package/esm/test/format-check.eot +0 -0
- package/esm/test/format-check.otf +0 -0
- package/esm/test/format-check.svg +25 -0
- package/esm/test/format-check.ttf +0 -0
- package/esm/test/format-check.woff +0 -0
- package/esm/test/format-check.woff2 +0 -0
- package/esm/test/material-icons.woff2 +0 -0
- package/esm/ttf2svg/mod.d.ts +9 -0
- package/esm/ttf2svg/mod.js +167 -0
- package/package.json +42 -0
- package/script/_dnt.shims.d.ts +5 -0
- package/script/_dnt.shims.js +65 -0
- package/script/deps/deno.land/std@0.221.0/assert/assert.d.ts +12 -0
- package/script/deps/deno.land/std@0.221.0/assert/assert.js +22 -0
- package/script/deps/deno.land/std@0.221.0/assert/assertion_error.d.ts +14 -0
- package/script/deps/deno.land/std@0.221.0/assert/assertion_error.js +22 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/assert_path.d.ts +1 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/assert_path.js +11 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/basename.d.ts +3 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/basename.js +46 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/common.d.ts +1 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/common.js +27 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/constants.d.ts +39 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/constants.js +49 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/dirname.d.ts +1 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/dirname.js +12 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/format.d.ts +3 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/format.js +24 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/from_file_url.d.ts +2 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/from_file_url.js +13 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/glob_to_reg_exp.d.ts +28 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/glob_to_reg_exp.js +241 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/normalize.d.ts +1 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/normalize.js +12 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/normalize_string.d.ts +1 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/normalize_string.js +81 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/relative.d.ts +1 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/relative.js +13 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/strip_trailing_separators.d.ts +1 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/strip_trailing_separators.js +23 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/to_file_url.d.ts +1 -0
- package/script/deps/deno.land/std@0.221.0/path/_common/to_file_url.js +19 -0
- package/script/deps/deno.land/std@0.221.0/path/_interface.d.ts +38 -0
- package/script/deps/deno.land/std@0.221.0/path/_interface.js +4 -0
- package/script/deps/deno.land/std@0.221.0/path/_os.d.ts +3 -0
- package/script/deps/deno.land/std@0.221.0/path/_os.js +44 -0
- package/script/deps/deno.land/std@0.221.0/path/basename.d.ts +17 -0
- package/script/deps/deno.land/std@0.221.0/path/basename.js +30 -0
- package/script/deps/deno.land/std@0.221.0/path/common.d.ts +13 -0
- package/script/deps/deno.land/std@0.221.0/path/common.js +23 -0
- package/script/deps/deno.land/std@0.221.0/path/constants.d.ts +3 -0
- package/script/deps/deno.land/std@0.221.0/path/constants.js +9 -0
- package/script/deps/deno.land/std@0.221.0/path/dirname.d.ts +5 -0
- package/script/deps/deno.land/std@0.221.0/path/dirname.js +16 -0
- package/script/deps/deno.land/std@0.221.0/path/extname.d.ts +6 -0
- package/script/deps/deno.land/std@0.221.0/path/extname.js +17 -0
- package/script/deps/deno.land/std@0.221.0/path/format.d.ts +8 -0
- package/script/deps/deno.land/std@0.221.0/path/format.js +18 -0
- package/script/deps/deno.land/std@0.221.0/path/from_file_url.d.ts +18 -0
- package/script/deps/deno.land/std@0.221.0/path/from_file_url.js +28 -0
- package/script/deps/deno.land/std@0.221.0/path/glob_to_regexp.d.ts +62 -0
- package/script/deps/deno.land/std@0.221.0/path/glob_to_regexp.js +69 -0
- package/script/deps/deno.land/std@0.221.0/path/is_absolute.d.ts +5 -0
- package/script/deps/deno.land/std@0.221.0/path/is_absolute.js +16 -0
- package/script/deps/deno.land/std@0.221.0/path/is_glob.d.ts +2 -0
- package/script/deps/deno.land/std@0.221.0/path/is_glob.js +32 -0
- package/script/deps/deno.land/std@0.221.0/path/join.d.ts +5 -0
- package/script/deps/deno.land/std@0.221.0/path/join.js +16 -0
- package/script/deps/deno.land/std@0.221.0/path/join_globs.d.ts +4 -0
- package/script/deps/deno.land/std@0.221.0/path/join_globs.js +15 -0
- package/script/deps/deno.land/std@0.221.0/path/mod.d.ts +56 -0
- package/script/deps/deno.land/std@0.221.0/path/mod.js +89 -0
- package/script/deps/deno.land/std@0.221.0/path/normalize.d.ts +7 -0
- package/script/deps/deno.land/std@0.221.0/path/normalize.js +18 -0
- package/script/deps/deno.land/std@0.221.0/path/normalize_glob.d.ts +4 -0
- package/script/deps/deno.land/std@0.221.0/path/normalize_glob.js +15 -0
- package/script/deps/deno.land/std@0.221.0/path/parse.d.ts +18 -0
- package/script/deps/deno.land/std@0.221.0/path/parse.js +28 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/_util.d.ts +1 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/_util.js +12 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/basename.d.ts +17 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/basename.js +31 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/common.d.ts +13 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/common.js +23 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/constants.d.ts +3 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/constants.js +8 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/dirname.d.ts +14 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/dirname.js +49 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/extname.d.ts +15 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/extname.js +72 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/format.d.ts +6 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/format.js +15 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/from_file_url.d.ts +12 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/from_file_url.js +21 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/glob_to_regexp.d.ts +57 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/glob_to_regexp.js +73 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/is_absolute.d.ts +5 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/is_absolute.js +16 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/is_glob.d.ts +1 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/is_glob.js +7 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/join.d.ts +5 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/join.js +30 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/join_globs.d.ts +4 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/join_globs.js +30 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/mod.d.ts +38 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/mod.js +58 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/normalize.d.ts +7 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/normalize.js +29 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/normalize_glob.d.ts +4 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/normalize_glob.js +20 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/parse.d.ts +6 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/parse.js +102 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/relative.d.ts +7 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/relative.js +98 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/resolve.d.ts +5 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/resolve.js +75 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/to_file_url.d.ts +12 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/to_file_url.js +26 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/to_namespaced_path.d.ts +5 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/to_namespaced_path.js +14 -0
- package/script/deps/deno.land/std@0.221.0/path/relative.d.ts +12 -0
- package/script/deps/deno.land/std@0.221.0/path/relative.js +23 -0
- package/script/deps/deno.land/std@0.221.0/path/resolve.d.ts +5 -0
- package/script/deps/deno.land/std@0.221.0/path/resolve.js +18 -0
- package/script/deps/deno.land/std@0.221.0/path/to_file_url.d.ts +18 -0
- package/script/deps/deno.land/std@0.221.0/path/to_file_url.js +28 -0
- package/script/deps/deno.land/std@0.221.0/path/to_namespaced_path.d.ts +5 -0
- package/script/deps/deno.land/std@0.221.0/path/to_namespaced_path.js +18 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/_util.d.ts +3 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/_util.js +21 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/basename.d.ts +17 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/basename.js +43 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/common.d.ts +13 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/common.js +23 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/constants.d.ts +3 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/constants.js +8 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/dirname.d.ts +5 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/dirname.js +102 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/extname.d.ts +6 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/extname.js +72 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/format.d.ts +6 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/format.js +15 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/from_file_url.d.ts +14 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/from_file_url.js +30 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/glob_to_regexp.d.ts +57 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/glob_to_regexp.js +73 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/is_absolute.d.ts +5 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/is_absolute.js +31 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/is_glob.d.ts +1 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/is_glob.js +7 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/join.d.ts +5 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/join.js +76 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/join_globs.d.ts +4 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/join_globs.js +30 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/mod.d.ts +38 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/mod.js +58 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/normalize.d.ts +7 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/normalize.js +134 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/normalize_glob.d.ts +4 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/normalize_glob.js +20 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/parse.d.ts +6 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/parse.js +163 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/relative.d.ts +12 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/relative.js +125 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/resolve.d.ts +5 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/resolve.js +170 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/to_file_url.d.ts +14 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/to_file_url.js +35 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/to_namespaced_path.d.ts +5 -0
- package/script/deps/deno.land/std@0.221.0/path/windows/to_namespaced_path.js +42 -0
- package/script/fontconv/cli.d.ts +2 -0
- package/script/fontconv/cli.js +61 -0
- package/script/fontconv/mod.d.ts +10 -0
- package/script/fontconv/mod.js +186 -0
- package/script/fontconv/test.d.ts +1 -0
- package/script/package.json +3 -0
- package/script/test/bootstrap-icons.woff2 +0 -0
- package/script/test/format-check.eot +0 -0
- package/script/test/format-check.otf +0 -0
- package/script/test/format-check.svg +25 -0
- package/script/test/format-check.ttf +0 -0
- package/script/test/format-check.woff +0 -0
- package/script/test/format-check.woff2 +0 -0
- package/script/test/material-icons.woff2 +0 -0
- package/script/ttf2svg/mod.d.ts +9 -0
- package/script/ttf2svg/mod.js +204 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { GlobOptions } from "./_common/glob_to_reg_exp.js";
|
|
2
|
+
import { type OSType } from "./_os.js";
|
|
3
|
+
export type { GlobOptions };
|
|
4
|
+
export type GlobToRegExpOptions = GlobOptions & {
|
|
5
|
+
os?: OSType;
|
|
6
|
+
};
|
|
7
|
+
/** Convert a glob string to a regular expression.
|
|
8
|
+
*
|
|
9
|
+
* Tries to match bash glob expansion as closely as possible.
|
|
10
|
+
*
|
|
11
|
+
* Basic glob syntax:
|
|
12
|
+
* - `*` - Matches everything without leaving the path segment.
|
|
13
|
+
* - `?` - Matches any single character.
|
|
14
|
+
* - `{foo,bar}` - Matches `foo` or `bar`.
|
|
15
|
+
* - `[abcd]` - Matches `a`, `b`, `c` or `d`.
|
|
16
|
+
* - `[a-d]` - Matches `a`, `b`, `c` or `d`.
|
|
17
|
+
* - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`.
|
|
18
|
+
* - `[[:<class>:]]` - Matches any character belonging to `<class>`.
|
|
19
|
+
* - `[[:alnum:]]` - Matches any digit or letter.
|
|
20
|
+
* - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`.
|
|
21
|
+
* - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes
|
|
22
|
+
* for a complete list of supported character classes.
|
|
23
|
+
* - `\` - Escapes the next character for an `os` other than `"windows"`.
|
|
24
|
+
* - \` - Escapes the next character for `os` set to `"windows"`.
|
|
25
|
+
* - `/` - Path separator.
|
|
26
|
+
* - `\` - Additional path separator only for `os` set to `"windows"`.
|
|
27
|
+
*
|
|
28
|
+
* Extended syntax:
|
|
29
|
+
* - Requires `{ extended: true }`.
|
|
30
|
+
* - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`.
|
|
31
|
+
* - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same.
|
|
32
|
+
* - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`.
|
|
33
|
+
* - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`.
|
|
34
|
+
* - `!(foo|bar)` - Matches anything other than `{foo,bar}`.
|
|
35
|
+
* - See https://www.linuxjournal.com/content/bash-extended-globbing.
|
|
36
|
+
*
|
|
37
|
+
* Globstar syntax:
|
|
38
|
+
* - Requires `{ globstar: true }`.
|
|
39
|
+
* - `**` - Matches any number of any path segments.
|
|
40
|
+
* - Must comprise its entire path segment in the provided glob.
|
|
41
|
+
* - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
|
|
42
|
+
*
|
|
43
|
+
* Note the following properties:
|
|
44
|
+
* - The generated `RegExp` is anchored at both start and end.
|
|
45
|
+
* - Repeating and trailing separators are tolerated. Trailing separators in the
|
|
46
|
+
* provided glob have no meaning and are discarded.
|
|
47
|
+
* - Absolute globs will only match absolute paths, etc.
|
|
48
|
+
* - Empty globs will match nothing.
|
|
49
|
+
* - Any special glob syntax must be contained to one path segment. For example,
|
|
50
|
+
* `?(foo|bar/baz)` is invalid. The separator will take precedence and the
|
|
51
|
+
* first segment ends with an unclosed group.
|
|
52
|
+
* - If a path segment ends with unclosed groups or a dangling escape prefix, a
|
|
53
|
+
* parse error has occurred. Every character for that segment is taken
|
|
54
|
+
* literally in this event.
|
|
55
|
+
*
|
|
56
|
+
* Limitations:
|
|
57
|
+
* - A negative group like `!(foo|bar)` will wrongly be converted to a negative
|
|
58
|
+
* look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly
|
|
59
|
+
* fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively,
|
|
60
|
+
* `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if
|
|
61
|
+
* the group occurs not nested at the end of the segment. */
|
|
62
|
+
export declare function globToRegExp(glob: string, options?: GlobToRegExpOptions): RegExp;
|
|
@@ -0,0 +1,65 @@
|
|
|
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 { globToRegExp as posixGlobToRegExp } from "./posix/glob_to_regexp.js";
|
|
5
|
+
import { globToRegExp as windowsGlobToRegExp, } from "./windows/glob_to_regexp.js";
|
|
6
|
+
/** Convert a glob string to a regular expression.
|
|
7
|
+
*
|
|
8
|
+
* Tries to match bash glob expansion as closely as possible.
|
|
9
|
+
*
|
|
10
|
+
* Basic glob syntax:
|
|
11
|
+
* - `*` - Matches everything without leaving the path segment.
|
|
12
|
+
* - `?` - Matches any single character.
|
|
13
|
+
* - `{foo,bar}` - Matches `foo` or `bar`.
|
|
14
|
+
* - `[abcd]` - Matches `a`, `b`, `c` or `d`.
|
|
15
|
+
* - `[a-d]` - Matches `a`, `b`, `c` or `d`.
|
|
16
|
+
* - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`.
|
|
17
|
+
* - `[[:<class>:]]` - Matches any character belonging to `<class>`.
|
|
18
|
+
* - `[[:alnum:]]` - Matches any digit or letter.
|
|
19
|
+
* - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`.
|
|
20
|
+
* - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes
|
|
21
|
+
* for a complete list of supported character classes.
|
|
22
|
+
* - `\` - Escapes the next character for an `os` other than `"windows"`.
|
|
23
|
+
* - \` - Escapes the next character for `os` set to `"windows"`.
|
|
24
|
+
* - `/` - Path separator.
|
|
25
|
+
* - `\` - Additional path separator only for `os` set to `"windows"`.
|
|
26
|
+
*
|
|
27
|
+
* Extended syntax:
|
|
28
|
+
* - Requires `{ extended: true }`.
|
|
29
|
+
* - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`.
|
|
30
|
+
* - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same.
|
|
31
|
+
* - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`.
|
|
32
|
+
* - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`.
|
|
33
|
+
* - `!(foo|bar)` - Matches anything other than `{foo,bar}`.
|
|
34
|
+
* - See https://www.linuxjournal.com/content/bash-extended-globbing.
|
|
35
|
+
*
|
|
36
|
+
* Globstar syntax:
|
|
37
|
+
* - Requires `{ globstar: true }`.
|
|
38
|
+
* - `**` - Matches any number of any path segments.
|
|
39
|
+
* - Must comprise its entire path segment in the provided glob.
|
|
40
|
+
* - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
|
|
41
|
+
*
|
|
42
|
+
* Note the following properties:
|
|
43
|
+
* - The generated `RegExp` is anchored at both start and end.
|
|
44
|
+
* - Repeating and trailing separators are tolerated. Trailing separators in the
|
|
45
|
+
* provided glob have no meaning and are discarded.
|
|
46
|
+
* - Absolute globs will only match absolute paths, etc.
|
|
47
|
+
* - Empty globs will match nothing.
|
|
48
|
+
* - Any special glob syntax must be contained to one path segment. For example,
|
|
49
|
+
* `?(foo|bar/baz)` is invalid. The separator will take precedence and the
|
|
50
|
+
* first segment ends with an unclosed group.
|
|
51
|
+
* - If a path segment ends with unclosed groups or a dangling escape prefix, a
|
|
52
|
+
* parse error has occurred. Every character for that segment is taken
|
|
53
|
+
* literally in this event.
|
|
54
|
+
*
|
|
55
|
+
* Limitations:
|
|
56
|
+
* - A negative group like `!(foo|bar)` will wrongly be converted to a negative
|
|
57
|
+
* look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly
|
|
58
|
+
* fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively,
|
|
59
|
+
* `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if
|
|
60
|
+
* the group occurs not nested at the end of the segment. */
|
|
61
|
+
export function globToRegExp(glob, options = {}) {
|
|
62
|
+
return options.os === "windows" || (!options.os && isWindows)
|
|
63
|
+
? windowsGlobToRegExp(glob, options)
|
|
64
|
+
: posixGlobToRegExp(glob, options);
|
|
65
|
+
}
|
|
@@ -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 { isAbsolute as posixIsAbsolute } from "./posix/is_absolute.js";
|
|
5
|
+
import { isAbsolute as windowsIsAbsolute } from "./windows/is_absolute.js";
|
|
6
|
+
/**
|
|
7
|
+
* Verifies whether provided path is absolute
|
|
8
|
+
* @param path to be verified as absolute
|
|
9
|
+
*/
|
|
10
|
+
export function isAbsolute(path) {
|
|
11
|
+
return isWindows ? windowsIsAbsolute(path) : posixIsAbsolute(path);
|
|
12
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
/** Test whether the given string is a glob */
|
|
4
|
+
export function isGlob(str) {
|
|
5
|
+
const chars = { "{": "}", "(": ")", "[": "]" };
|
|
6
|
+
const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
|
|
7
|
+
if (str === "") {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
let match;
|
|
11
|
+
while ((match = regex.exec(str))) {
|
|
12
|
+
if (match[2])
|
|
13
|
+
return true;
|
|
14
|
+
let idx = match.index + match[0].length;
|
|
15
|
+
// if an open bracket/brace/paren is escaped,
|
|
16
|
+
// set the index to the next closing character
|
|
17
|
+
const open = match[1];
|
|
18
|
+
const close = open ? chars[open] : null;
|
|
19
|
+
if (open && close) {
|
|
20
|
+
const n = str.indexOf(close, idx);
|
|
21
|
+
if (n !== -1) {
|
|
22
|
+
idx = n + 1;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
str = str.slice(idx);
|
|
26
|
+
}
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
@@ -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 { join as posixJoin } from "./posix/join.js";
|
|
5
|
+
import { join as windowsJoin } from "./windows/join.js";
|
|
6
|
+
/**
|
|
7
|
+
* Join all given a sequence of `paths`,then normalizes the resulting path.
|
|
8
|
+
* @param paths to be joined and normalized
|
|
9
|
+
*/
|
|
10
|
+
export function join(...paths) {
|
|
11
|
+
return isWindows ? windowsJoin(...paths) : posixJoin(...paths);
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
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 { joinGlobs as posixJoinGlobs } from "./posix/join_globs.js";
|
|
5
|
+
import { joinGlobs as windowsJoinGlobs } from "./windows/join_globs.js";
|
|
6
|
+
/** Like join(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
7
|
+
export function joinGlobs(globs, options = {}) {
|
|
8
|
+
return isWindows
|
|
9
|
+
? windowsJoinGlobs(globs, options)
|
|
10
|
+
: posixJoinGlobs(globs, options);
|
|
11
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utilities for working with OS-specific file paths.
|
|
3
|
+
*
|
|
4
|
+
* Functions from this module will automatically switch to support the path style
|
|
5
|
+
* of the current OS, either `windows` for Microsoft Windows, or `posix` for
|
|
6
|
+
* every other operating system, eg. Linux, MacOS, BSD etc.
|
|
7
|
+
*
|
|
8
|
+
* To use functions for a specific path style regardless of the current OS
|
|
9
|
+
* import the modules from the platform sub directory instead.
|
|
10
|
+
*
|
|
11
|
+
* Example, for `posix`:
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { fromFileUrl } from "https://deno.land/std@$STD_VERSION/path/posix/from_file_url.ts";
|
|
15
|
+
* const p = fromFileUrl("file:///home/foo");
|
|
16
|
+
* console.log(p); // "/home/foo"
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* or, for `windows`:
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { fromFileUrl } from "https://deno.land/std@$STD_VERSION/path/windows/from_file_url.ts";
|
|
23
|
+
* const p = fromFileUrl("file:///home/foo");
|
|
24
|
+
* console.log(p); // "\\home\\foo"
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* This module is browser compatible.
|
|
28
|
+
*
|
|
29
|
+
* @module
|
|
30
|
+
*/
|
|
31
|
+
import * as _windows from "./windows/mod.js";
|
|
32
|
+
import * as _posix from "./posix/mod.js";
|
|
33
|
+
/** @deprecated (will be removed after 1.0.0) Import from {@link https://deno.land/std/path/windows/mod.ts} instead. */
|
|
34
|
+
export declare const win32: typeof _windows;
|
|
35
|
+
/** @deprecated (will be removed after 1.0.0) Import from {@link https://deno.land/std/path/posix/mod.ts} instead. */
|
|
36
|
+
export declare const posix: typeof _posix;
|
|
37
|
+
export * from "./basename.js";
|
|
38
|
+
export * from "./constants.js";
|
|
39
|
+
export * from "./dirname.js";
|
|
40
|
+
export * from "./extname.js";
|
|
41
|
+
export * from "./format.js";
|
|
42
|
+
export * from "./from_file_url.js";
|
|
43
|
+
export * from "./is_absolute.js";
|
|
44
|
+
export * from "./join.js";
|
|
45
|
+
export * from "./normalize.js";
|
|
46
|
+
export * from "./parse.js";
|
|
47
|
+
export * from "./relative.js";
|
|
48
|
+
export * from "./resolve.js";
|
|
49
|
+
export * from "./to_file_url.js";
|
|
50
|
+
export * from "./to_namespaced_path.js";
|
|
51
|
+
export * from "./common.js";
|
|
52
|
+
export * from "./_interface.js";
|
|
53
|
+
export * from "./glob_to_regexp.js";
|
|
54
|
+
export * from "./is_glob.js";
|
|
55
|
+
export * from "./join_globs.js";
|
|
56
|
+
export * from "./normalize_glob.js";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// Copyright the Browserify authors. MIT License.
|
|
3
|
+
// Ported mostly from https://github.com/browserify/path-browserify/
|
|
4
|
+
// This module is browser compatible.
|
|
5
|
+
/**
|
|
6
|
+
* Utilities for working with OS-specific file paths.
|
|
7
|
+
*
|
|
8
|
+
* Functions from this module will automatically switch to support the path style
|
|
9
|
+
* of the current OS, either `windows` for Microsoft Windows, or `posix` for
|
|
10
|
+
* every other operating system, eg. Linux, MacOS, BSD etc.
|
|
11
|
+
*
|
|
12
|
+
* To use functions for a specific path style regardless of the current OS
|
|
13
|
+
* import the modules from the platform sub directory instead.
|
|
14
|
+
*
|
|
15
|
+
* Example, for `posix`:
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* import { fromFileUrl } from "https://deno.land/std@$STD_VERSION/path/posix/from_file_url.ts";
|
|
19
|
+
* const p = fromFileUrl("file:///home/foo");
|
|
20
|
+
* console.log(p); // "/home/foo"
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* or, for `windows`:
|
|
24
|
+
*
|
|
25
|
+
* ```ts
|
|
26
|
+
* import { fromFileUrl } from "https://deno.land/std@$STD_VERSION/path/windows/from_file_url.ts";
|
|
27
|
+
* const p = fromFileUrl("file:///home/foo");
|
|
28
|
+
* console.log(p); // "\\home\\foo"
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* This module is browser compatible.
|
|
32
|
+
*
|
|
33
|
+
* @module
|
|
34
|
+
*/
|
|
35
|
+
import * as _windows from "./windows/mod.js";
|
|
36
|
+
import * as _posix from "./posix/mod.js";
|
|
37
|
+
/** @deprecated (will be removed after 1.0.0) Import from {@link https://deno.land/std/path/windows/mod.ts} instead. */
|
|
38
|
+
export const win32 = _windows;
|
|
39
|
+
/** @deprecated (will be removed after 1.0.0) Import from {@link https://deno.land/std/path/posix/mod.ts} instead. */
|
|
40
|
+
export const posix = _posix;
|
|
41
|
+
export * from "./basename.js";
|
|
42
|
+
export * from "./constants.js";
|
|
43
|
+
export * from "./dirname.js";
|
|
44
|
+
export * from "./extname.js";
|
|
45
|
+
export * from "./format.js";
|
|
46
|
+
export * from "./from_file_url.js";
|
|
47
|
+
export * from "./is_absolute.js";
|
|
48
|
+
export * from "./join.js";
|
|
49
|
+
export * from "./normalize.js";
|
|
50
|
+
export * from "./parse.js";
|
|
51
|
+
export * from "./relative.js";
|
|
52
|
+
export * from "./resolve.js";
|
|
53
|
+
export * from "./to_file_url.js";
|
|
54
|
+
export * from "./to_namespaced_path.js";
|
|
55
|
+
export * from "./common.js";
|
|
56
|
+
export * from "./_interface.js";
|
|
57
|
+
export * from "./glob_to_regexp.js";
|
|
58
|
+
export * from "./is_glob.js";
|
|
59
|
+
export * from "./join_globs.js";
|
|
60
|
+
export * from "./normalize_glob.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalize the `path`, resolving `'..'` and `'.'` segments.
|
|
3
|
+
* Note that resolving these segments does not necessarily mean that all will be eliminated.
|
|
4
|
+
* A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`.
|
|
5
|
+
* @param path to be normalized
|
|
6
|
+
*/
|
|
7
|
+
export declare function normalize(path: string): 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 { normalize as posixNormalize } from "./posix/normalize.js";
|
|
5
|
+
import { normalize as windowsNormalize } from "./windows/normalize.js";
|
|
6
|
+
/**
|
|
7
|
+
* Normalize the `path`, resolving `'..'` and `'.'` segments.
|
|
8
|
+
* Note that resolving these segments does not necessarily mean that all will be eliminated.
|
|
9
|
+
* A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`.
|
|
10
|
+
* @param path to be normalized
|
|
11
|
+
*/
|
|
12
|
+
export function normalize(path) {
|
|
13
|
+
return isWindows ? windowsNormalize(path) : posixNormalize(path);
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
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 { normalizeGlob as posixNormalizeGlob } from "./posix/normalize_glob.js";
|
|
5
|
+
import { normalizeGlob as windowsNormalizeGlob, } from "./windows/normalize_glob.js";
|
|
6
|
+
/** Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. */
|
|
7
|
+
export function normalizeGlob(glob, options = {}) {
|
|
8
|
+
return isWindows
|
|
9
|
+
? windowsNormalizeGlob(glob, options)
|
|
10
|
+
: posixNormalizeGlob(glob, options);
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ParsedPath } from "./_interface.js";
|
|
2
|
+
/**
|
|
3
|
+
* Return a `ParsedPath` object of the `path`. Use `format` to reverse the result.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { parse } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
|
|
8
|
+
*
|
|
9
|
+
* const parsedPathObj = parse("/path/to/dir/script.ts");
|
|
10
|
+
* parsedPathObj.root; // "/"
|
|
11
|
+
* parsedPathObj.dir; // "/path/to/dir"
|
|
12
|
+
* parsedPathObj.base; // "script.ts"
|
|
13
|
+
* parsedPathObj.ext; // ".ts"
|
|
14
|
+
* parsedPathObj.name; // "script"
|
|
15
|
+
* ```
|
|
16
|
+
* @param path to process
|
|
17
|
+
*/
|
|
18
|
+
export declare function parse(path: string): ParsedPath;
|
|
@@ -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 { parse as posixParse } from "./posix/parse.js";
|
|
5
|
+
import { parse as windowsParse } from "./windows/parse.js";
|
|
6
|
+
/**
|
|
7
|
+
* Return a `ParsedPath` object of the `path`. Use `format` to reverse the result.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { parse } from "https://deno.land/std@$STD_VERSION/path/mod.ts";
|
|
12
|
+
*
|
|
13
|
+
* const parsedPathObj = parse("/path/to/dir/script.ts");
|
|
14
|
+
* parsedPathObj.root; // "/"
|
|
15
|
+
* parsedPathObj.dir; // "/path/to/dir"
|
|
16
|
+
* parsedPathObj.base; // "script.ts"
|
|
17
|
+
* parsedPathObj.ext; // ".ts"
|
|
18
|
+
* parsedPathObj.name; // "script"
|
|
19
|
+
* ```
|
|
20
|
+
* @param path to process
|
|
21
|
+
*/
|
|
22
|
+
export function parse(path) {
|
|
23
|
+
return isWindows ? windowsParse(path) : posixParse(path);
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isPosixPathSeparator(code: number): boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
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_FORWARD_SLASH } from "../_common/constants.js";
|
|
6
|
+
export function isPosixPathSeparator(code) {
|
|
7
|
+
return code === CHAR_FORWARD_SLASH;
|
|
8
|
+
}
|
|
@@ -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
|
+
* console.log(basename("/home/user/Documents/")); // "Documents"
|
|
10
|
+
* console.log(basename("/home/user/Documents/image.png")); // "image.png"
|
|
11
|
+
* console.log(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,27 @@
|
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { assertArgs, lastPathSegment, stripSuffix, } from "../_common/basename.js";
|
|
4
|
+
import { stripTrailingSeparators } from "../_common/strip_trailing_separators.js";
|
|
5
|
+
import { isPosixPathSeparator } from "./_util.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
|
+
* console.log(basename("/home/user/Documents/")); // "Documents"
|
|
15
|
+
* console.log(basename("/home/user/Documents/image.png")); // "image.png"
|
|
16
|
+
* console.log(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
|
+
assertArgs(path, suffix);
|
|
24
|
+
const lastSegment = lastPathSegment(path, isPosixPathSeparator);
|
|
25
|
+
const strippedSegment = stripTrailingSeparators(lastSegment, isPosixPathSeparator);
|
|
26
|
+
return suffix ? stripSuffix(strippedSegment, suffix) : strippedSegment;
|
|
27
|
+
}
|
|
@@ -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,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return the directory path of a `path`.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { dirname } from "https://deno.land/std@$STD_VERSION/path/dirname.ts";
|
|
7
|
+
*
|
|
8
|
+
* console.log(dirname("/home/user/Documents/")); // "/home/user"
|
|
9
|
+
* console.log(dirname("/home/user/Documents/image.png")); // "/home/user/Documents"
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* @param path - path to extract the directory from.
|
|
13
|
+
*/
|
|
14
|
+
export declare function dirname(path: string): string;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { assertArg } from "../_common/dirname.js";
|
|
4
|
+
import { stripTrailingSeparators } from "../_common/strip_trailing_separators.js";
|
|
5
|
+
import { isPosixPathSeparator } from "./_util.js";
|
|
6
|
+
/**
|
|
7
|
+
* Return the directory path of a `path`.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { dirname } from "https://deno.land/std@$STD_VERSION/path/dirname.ts";
|
|
12
|
+
*
|
|
13
|
+
* console.log(dirname("/home/user/Documents/")); // "/home/user"
|
|
14
|
+
* console.log(dirname("/home/user/Documents/image.png")); // "/home/user/Documents"
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @param path - path to extract the directory from.
|
|
18
|
+
*/
|
|
19
|
+
export function dirname(path) {
|
|
20
|
+
assertArg(path);
|
|
21
|
+
let end = -1;
|
|
22
|
+
let matchedNonSeparator = false;
|
|
23
|
+
for (let i = path.length - 1; i >= 1; --i) {
|
|
24
|
+
if (isPosixPathSeparator(path.charCodeAt(i))) {
|
|
25
|
+
if (matchedNonSeparator) {
|
|
26
|
+
end = i;
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
matchedNonSeparator = true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// No matches. Fallback based on provided path:
|
|
35
|
+
//
|
|
36
|
+
// - leading slashes paths
|
|
37
|
+
// "/foo" => "/"
|
|
38
|
+
// "///foo" => "/"
|
|
39
|
+
// - no slash path
|
|
40
|
+
// "foo" => "."
|
|
41
|
+
if (end === -1) {
|
|
42
|
+
return isPosixPathSeparator(path.charCodeAt(0)) ? "/" : ".";
|
|
43
|
+
}
|
|
44
|
+
return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator);
|
|
45
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return the extension of the `path` with leading period.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { extname } from "https://deno.land/std@$STD_VERSION/path/extname.ts";
|
|
7
|
+
*
|
|
8
|
+
* console.log(extname("/home/user/Documents/")); // ""
|
|
9
|
+
* console.log(extname("/home/user/Documents/image.png")); // ".png"
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* @param path with extension
|
|
13
|
+
* @returns extension (ex. for `file.ts` returns `.ts`)
|
|
14
|
+
*/
|
|
15
|
+
export declare function extname(path: string): string;
|