@fedify/fedify 0.5.0-dev.88
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.
Potentially problematic release.
This version of @fedify/fedify might be problematic. Click here for more details.
- package/CHANGES.md +239 -0
- package/LICENSE +661 -0
- package/README.md +96 -0
- package/esm/_dnt.shims.d.ts +11 -0
- package/esm/_dnt.shims.d.ts.map +1 -0
- package/esm/_dnt.shims.js +67 -0
- package/esm/_dnt.test_polyfills.d.ts.map +1 -0
- package/esm/_dnt.test_shims.d.ts.map +1 -0
- package/esm/codegen/fs.d.ts.map +1 -0
- package/esm/codegen/schema.d.ts.map +1 -0
- package/esm/codegen/schema.yaml +194 -0
- package/esm/codegen/type.d.ts.map +1 -0
- package/esm/deps/crux.land/api/get/2KNRVU.d.ts.map +1 -0
- package/esm/deps/deno.land/x/mock_fetch@0.3.0/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@david/which-runtime/0.2.0/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/collections.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/concat.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/drop.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/filter.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/fold.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/infinite.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/map.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/range.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/take.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/tee.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/testing.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/unique.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/_constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/_diff.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/_format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_almost_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_array_includes.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_exists.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_false.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_greater.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_greater_or_equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_instance_of.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_is_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_less.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_less_or_equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_not_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_not_instance_of.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_not_match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_not_strict_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_object_match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_rejects.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_strict_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_string_includes.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_throws.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assertion_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/fail.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/unimplemented.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/unreachable.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/concat.d.ts +14 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/concat.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/concat.js +27 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/copy.d.ts +28 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/copy.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/copy.js +37 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/ends_with.d.ts +14 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/ends_with.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/ends_with.js +23 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/equals.d.ts +6 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/equals.js +44 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/includes_needle.d.ts +17 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/includes_needle.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/includes_needle.js +21 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/index_of_needle.d.ts +18 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/index_of_needle.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/index_of_needle.js +45 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/last_index_of_needle.d.ts +18 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/last_index_of_needle.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/last_index_of_needle.js +45 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/mod.d.ts +24 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/mod.js +25 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/repeat.d.ts +15 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/repeat.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/repeat.js +33 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/starts_with.d.ts +14 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/starts_with.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/starts_with.js +21 -0
- package/esm/deps/jsr.io/@std/encoding/0.220.1/_util.d.ts +2 -0
- package/esm/deps/jsr.io/@std/encoding/0.220.1/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/0.220.1/_util.js +26 -0
- package/esm/deps/jsr.io/@std/encoding/0.220.1/base64.d.ts +27 -0
- package/esm/deps/jsr.io/@std/encoding/0.220.1/base64.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/0.220.1/base64.js +141 -0
- package/esm/deps/jsr.io/@std/fmt/0.220.1/colors.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/0.220.1/_get_file_info_type.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/0.220.1/_to_path_string.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/0.220.1/ensure_dir.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/0.220.1/ensure_file.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/common.d.ts +38 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/common.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/common.js +40 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/encoding.d.ts +34 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/encoding.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/encoding.js +121 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/language.d.ts +31 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/language.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/language.js +113 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/media_type.d.ts +31 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/media_type.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/media_type.js +140 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/negotiation.d.ts +128 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/negotiation.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/negotiation.js +37 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/assert_path.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/common.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/dirname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/glob_to_reg_exp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/normalize_string.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/relative.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/strip_trailing_separators.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_interface.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_os.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/common.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/dirname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/glob_to_regexp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/is_glob.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/join_globs.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/normalize_glob.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/common.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/dirname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/glob_to_regexp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/is_glob.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/join_globs.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/normalize_glob.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/relative.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/resolve.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/to_namespaced_path.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/relative.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/resolve.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/to_namespaced_path.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/common.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/dirname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/glob_to_regexp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/is_glob.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/join_globs.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/normalize_glob.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/relative.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/resolve.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/to_namespaced_path.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/_constants.d.ts +2 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/_constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/_constants.js +10 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/_shared.d.ts +44 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/_shared.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/_shared.js +161 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/can_parse.d.ts +2 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/can_parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/can_parse.js +14 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/compare.d.ts +11 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/compare.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/compare.js +18 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/constants.d.ts +43 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/constants.js +73 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/difference.d.ts +6 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/difference.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/difference.js +16 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/equals.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/equals.js +10 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/format.d.ts +13 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/format.js +36 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/format_range.d.ts +9 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/format_range.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/format_range.js +16 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/greater_or_equal.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/greater_or_equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/greater_or_equal.js +9 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/greater_than.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/greater_than.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/greater_than.js +10 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/increment.d.ts +29 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/increment.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/increment.js +160 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/is_range.d.ts +13 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/is_range.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/is_range.js +28 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/is_semver.d.ts +18 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/is_semver.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/is_semver.js +38 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/less_or_equal.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/less_or_equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/less_or_equal.js +9 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/less_than.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/less_than.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/less_than.js +9 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/max_satisfying.d.ts +10 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/max_satisfying.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/max_satisfying.js +18 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/min_satisfying.d.ts +10 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/min_satisfying.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/min_satisfying.js +18 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/mod.d.ts +291 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/mod.js +293 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/not_equals.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/not_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/not_equals.js +9 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/parse.d.ts +9 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/parse.js +34 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/parse_range.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/parse_range.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/parse_range.js +336 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_intersects.d.ts +9 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_intersects.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_intersects.js +72 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_max.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_max.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_max.js +58 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_min.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_min.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_min.js +49 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/test_range.d.ts +9 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/test_range.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/test_range.js +69 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/try_parse.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/try_parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/try_parse.js +17 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/try_parse_range.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/try_parse_range.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/try_parse_range.js +17 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/types.d.ts +38 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/types.js +2 -0
- package/esm/deps/jsr.io/@std/testing/0.220.1/snapshot.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/text/0.220.1/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/text/0.220.1/case.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/text/0.220.1/closest_string.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/text/0.220.1/compare_similarity.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/text/0.220.1/levenshtein_distance.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/text/0.220.1/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/text/0.220.1/word_similarity_sort.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/url/0.220.1/_strip.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/url/0.220.1/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/url/0.220.1/dirname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/url/0.220.1/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/url/0.220.1/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/url/0.220.1/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/url/0.220.1/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_dumper/dumper.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_dumper/dumper_state.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_loader/loader.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_loader/loader_state.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_mark.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_state.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/binary.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/bool.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/float.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/function.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/int.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/map.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/merge.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/nil.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/omap.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/pairs.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/regexp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/seq.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/set.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/str.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/timestamp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/undefined.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_utils.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/schema/core.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/schema/default.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/schema/extended.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/schema/failsafe.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/schema/json.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/schema/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/schema.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/stringify.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/type.d.ts.map +1 -0
- package/esm/federation/callback.d.ts +56 -0
- package/esm/federation/callback.d.ts.map +1 -0
- package/esm/federation/callback.js +1 -0
- package/esm/federation/collection.d.ts +9 -0
- package/esm/federation/collection.d.ts.map +1 -0
- package/esm/federation/collection.js +1 -0
- package/esm/federation/context.d.ts +148 -0
- package/esm/federation/context.d.ts.map +1 -0
- package/esm/federation/context.js +1 -0
- package/esm/federation/handler.d.ts +83 -0
- package/esm/federation/handler.d.ts.map +1 -0
- package/esm/federation/handler.js +266 -0
- package/esm/federation/handler.test.d.ts.map +1 -0
- package/esm/federation/kv.d.ts +58 -0
- package/esm/federation/kv.d.ts.map +1 -0
- package/esm/federation/kv.js +45 -0
- package/esm/federation/middleware.d.ts +309 -0
- package/esm/federation/middleware.d.ts.map +1 -0
- package/esm/federation/middleware.js +626 -0
- package/esm/federation/middleware.test.d.ts.map +1 -0
- package/esm/federation/mod.d.ts +14 -0
- package/esm/federation/mod.d.ts.map +1 -0
- package/esm/federation/mod.js +13 -0
- package/esm/federation/mq.d.ts +42 -0
- package/esm/federation/mq.d.ts.map +1 -0
- package/esm/federation/mq.js +26 -0
- package/esm/federation/queue.d.ts +10 -0
- package/esm/federation/queue.d.ts.map +1 -0
- package/esm/federation/queue.js +1 -0
- package/esm/federation/router.d.ts +52 -0
- package/esm/federation/router.d.ts.map +1 -0
- package/esm/federation/router.js +80 -0
- package/esm/federation/router.test.d.ts.map +1 -0
- package/esm/federation/send.d.ts +60 -0
- package/esm/federation/send.d.ts.map +1 -0
- package/esm/federation/send.js +45 -0
- package/esm/federation/send.test.d.ts.map +1 -0
- package/esm/httpsig/key.d.ts +32 -0
- package/esm/httpsig/key.d.ts.map +1 -0
- package/esm/httpsig/key.js +62 -0
- package/esm/httpsig/key.test.d.ts.map +1 -0
- package/esm/httpsig/mod.d.ts +47 -0
- package/esm/httpsig/mod.d.ts.map +1 -0
- package/esm/httpsig/mod.js +193 -0
- package/esm/httpsig/mod.test.d.ts.map +1 -0
- package/esm/mod.d.ts +51 -0
- package/esm/mod.d.ts.map +1 -0
- package/esm/mod.js +50 -0
- package/esm/nodeinfo/handler.d.ts +33 -0
- package/esm/nodeinfo/handler.d.ts.map +1 -0
- package/esm/nodeinfo/handler.js +49 -0
- package/esm/nodeinfo/handler.test.d.ts.map +1 -0
- package/esm/nodeinfo/mod.d.ts +8 -0
- package/esm/nodeinfo/mod.d.ts.map +1 -0
- package/esm/nodeinfo/mod.js +7 -0
- package/esm/nodeinfo/types.d.ts +133 -0
- package/esm/nodeinfo/types.d.ts.map +1 -0
- package/esm/nodeinfo/types.js +60 -0
- package/esm/nodeinfo/types.test.d.ts.map +1 -0
- package/esm/package.json +3 -0
- package/esm/runtime/docloader.d.ts +104 -0
- package/esm/runtime/docloader.d.ts.map +1 -0
- package/esm/runtime/docloader.js +124 -0
- package/esm/runtime/docloader.test.d.ts.map +1 -0
- package/esm/runtime/key.d.ts +14 -0
- package/esm/runtime/key.d.ts.map +1 -0
- package/esm/runtime/key.js +24 -0
- package/esm/runtime/key.test.d.ts.map +1 -0
- package/esm/runtime/langstr.d.ts +15 -0
- package/esm/runtime/langstr.d.ts.map +1 -0
- package/esm/runtime/langstr.js +25 -0
- package/esm/runtime/langstr.test.d.ts.map +1 -0
- package/esm/runtime/mod.d.ts +10 -0
- package/esm/runtime/mod.d.ts.map +1 -0
- package/esm/runtime/mod.js +9 -0
- package/esm/shim/event.d.ts.map +1 -0
- package/esm/testing/context.d.ts.map +1 -0
- package/esm/testing/docloader.d.ts.map +1 -0
- package/esm/testing/fixtures/example.com/hong-gildong +11 -0
- package/esm/testing/fixtures/example.com/key +7 -0
- package/esm/testing/fixtures/example.com/key2 +6 -0
- package/esm/testing/fixtures/example.com/object +6 -0
- package/esm/testing/fixtures/example.com/person +22 -0
- package/esm/testing/fixtures/example.com/test +5 -0
- package/esm/testing/fixtures/example.com/users/handle +16 -0
- package/esm/testing/fixtures/example.com/wrong-type +3 -0
- package/esm/testing/fixtures/w3id.org/security/v1 +50 -0
- package/esm/testing/fixtures/www.w3.org/ns/activitystreams +379 -0
- package/esm/testing/keys.d.ts.map +1 -0
- package/esm/vocab/accept.yaml +11 -0
- package/esm/vocab/activity.yaml +42 -0
- package/esm/vocab/actor.d.ts +52 -0
- package/esm/vocab/actor.d.ts.map +1 -0
- package/esm/vocab/actor.js +94 -0
- package/esm/vocab/actor.test.d.ts.map +1 -0
- package/esm/vocab/add.yaml +12 -0
- package/esm/vocab/announce.yaml +11 -0
- package/esm/vocab/application.yaml +179 -0
- package/esm/vocab/article.yaml +8 -0
- package/esm/vocab/audio.yaml +8 -0
- package/esm/vocab/block.yaml +12 -0
- package/esm/vocab/collection.yaml +63 -0
- package/esm/vocab/collectionpage.yaml +38 -0
- package/esm/vocab/create.yaml +8 -0
- package/esm/vocab/delete.yaml +10 -0
- package/esm/vocab/dislike.yaml +8 -0
- package/esm/vocab/document.yaml +8 -0
- package/esm/vocab/endpoints.yaml +78 -0
- package/esm/vocab/event.yaml +8 -0
- package/esm/vocab/flag.yaml +11 -0
- package/esm/vocab/follow.yaml +12 -0
- package/esm/vocab/group.yaml +179 -0
- package/esm/vocab/ignore.yaml +10 -0
- package/esm/vocab/image.yaml +8 -0
- package/esm/vocab/intransitiveactivity.yaml +11 -0
- package/esm/vocab/key.yaml +25 -0
- package/esm/vocab/like.yaml +10 -0
- package/esm/vocab/link.yaml +92 -0
- package/esm/vocab/lookup.d.ts +42 -0
- package/esm/vocab/lookup.d.ts.map +1 -0
- package/esm/vocab/lookup.js +82 -0
- package/esm/vocab/lookup.test.d.ts.map +1 -0
- package/esm/vocab/mention.yaml +8 -0
- package/esm/vocab/mod.d.ts +55 -0
- package/esm/vocab/mod.d.ts.map +1 -0
- package/esm/vocab/mod.js +54 -0
- package/esm/vocab/note.yaml +10 -0
- package/esm/vocab/object.yaml +301 -0
- package/esm/vocab/orderedcollection.yaml +11 -0
- package/esm/vocab/orderedcollectionpage.yaml +20 -0
- package/esm/vocab/organization.yaml +179 -0
- package/esm/vocab/page.yaml +8 -0
- package/esm/vocab/person.yaml +179 -0
- package/esm/vocab/place.yaml +66 -0
- package/esm/vocab/profile.yaml +22 -0
- package/esm/vocab/reject.yaml +10 -0
- package/esm/vocab/relationship.yaml +46 -0
- package/esm/vocab/remove.yaml +10 -0
- package/esm/vocab/service.yaml +179 -0
- package/esm/vocab/undo.yaml +15 -0
- package/esm/vocab/update.yaml +13 -0
- package/esm/vocab/video.yaml +8 -0
- package/esm/vocab/vocab.d.ts +7191 -0
- package/esm/vocab/vocab.d.ts.map +1 -0
- package/esm/vocab/vocab.js +14279 -0
- package/esm/vocab/vocab.test.d.ts.map +1 -0
- package/esm/webfinger/handler.d.ts +29 -0
- package/esm/webfinger/handler.d.ts.map +1 -0
- package/esm/webfinger/handler.js +76 -0
- package/esm/webfinger/handler.test.d.ts.map +1 -0
- package/esm/webfinger/jrd.d.ts +52 -0
- package/esm/webfinger/jrd.d.ts.map +1 -0
- package/esm/webfinger/jrd.js +1 -0
- package/esm/webfinger/lookup.d.ts +9 -0
- package/esm/webfinger/lookup.d.ts.map +1 -0
- package/esm/webfinger/lookup.js +44 -0
- package/esm/webfinger/lookup.test.d.ts.map +1 -0
- package/esm/webfinger/mod.d.ts +8 -0
- package/esm/webfinger/mod.d.ts.map +1 -0
- package/esm/webfinger/mod.js +7 -0
- package/esm/x/fresh.d.ts +58 -0
- package/esm/x/fresh.d.ts.map +1 -0
- package/esm/x/fresh.js +77 -0
- package/logo.svg +187 -0
- package/package.json +60 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* Concatenate an array of {@linkcode Uint8Array}s.
|
3
|
+
*
|
4
|
+
* @example
|
5
|
+
* ```ts
|
6
|
+
* import { concat } from "@std/bytes/concat";
|
7
|
+
*
|
8
|
+
* const a = new Uint8Array([0, 1, 2]);
|
9
|
+
* const b = new Uint8Array([3, 4, 5]);
|
10
|
+
* concat([a, b]); // Uint8Array(6) [ 0, 1, 2, 3, 4, 5 ]
|
11
|
+
* ```
|
12
|
+
*/
|
13
|
+
export declare function concat(buf: Uint8Array[]): Uint8Array;
|
14
|
+
//# sourceMappingURL=concat.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"concat.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/0.220.1/concat.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,UAAU,CAapD"}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
/**
|
4
|
+
* Concatenate an array of {@linkcode Uint8Array}s.
|
5
|
+
*
|
6
|
+
* @example
|
7
|
+
* ```ts
|
8
|
+
* import { concat } from "@std/bytes/concat";
|
9
|
+
*
|
10
|
+
* const a = new Uint8Array([0, 1, 2]);
|
11
|
+
* const b = new Uint8Array([3, 4, 5]);
|
12
|
+
* concat([a, b]); // Uint8Array(6) [ 0, 1, 2, 3, 4, 5 ]
|
13
|
+
* ```
|
14
|
+
*/
|
15
|
+
export function concat(buf) {
|
16
|
+
let length = 0;
|
17
|
+
for (const b of buf) {
|
18
|
+
length += b.length;
|
19
|
+
}
|
20
|
+
const output = new Uint8Array(length);
|
21
|
+
let index = 0;
|
22
|
+
for (const b of buf) {
|
23
|
+
output.set(b, index);
|
24
|
+
index += b.length;
|
25
|
+
}
|
26
|
+
return output;
|
27
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
/** Copy bytes from the `src` array to the `dst` array. Returns the number of
|
2
|
+
* bytes copied.
|
3
|
+
*
|
4
|
+
* If the `src` array is larger than what the `dst` array can hold, only the
|
5
|
+
* amount of bytes that fit in the `dst` array are copied.
|
6
|
+
*
|
7
|
+
* An offset can be specified as the third argument that begins the copy at
|
8
|
+
* that given index in the `dst` array. The offset defaults to the beginning of
|
9
|
+
* the array.
|
10
|
+
*
|
11
|
+
* ```ts
|
12
|
+
* import { copy } from "@std/bytes/copy";
|
13
|
+
* const src = new Uint8Array([9, 8, 7]);
|
14
|
+
* const dst = new Uint8Array([0, 1, 2, 3, 4, 5]);
|
15
|
+
* console.log(copy(src, dst)); // 3
|
16
|
+
* console.log(dst); // [9, 8, 7, 3, 4, 5]
|
17
|
+
* ```
|
18
|
+
*
|
19
|
+
* ```ts
|
20
|
+
* import { copy } from "@std/bytes/copy";
|
21
|
+
* const src = new Uint8Array([1, 1, 1, 1]);
|
22
|
+
* const dst = new Uint8Array([0, 0, 0, 0]);
|
23
|
+
* console.log(copy(src, dst, 1)); // 3
|
24
|
+
* console.log(dst); // [0, 1, 1, 1]
|
25
|
+
* ```
|
26
|
+
*/
|
27
|
+
export declare function copy(src: Uint8Array, dst: Uint8Array, off?: number): number;
|
28
|
+
//# sourceMappingURL=copy.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/0.220.1/copy.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,SAAI,GAAG,MAAM,CAQtE"}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
/** Copy bytes from the `src` array to the `dst` array. Returns the number of
|
4
|
+
* bytes copied.
|
5
|
+
*
|
6
|
+
* If the `src` array is larger than what the `dst` array can hold, only the
|
7
|
+
* amount of bytes that fit in the `dst` array are copied.
|
8
|
+
*
|
9
|
+
* An offset can be specified as the third argument that begins the copy at
|
10
|
+
* that given index in the `dst` array. The offset defaults to the beginning of
|
11
|
+
* the array.
|
12
|
+
*
|
13
|
+
* ```ts
|
14
|
+
* import { copy } from "@std/bytes/copy";
|
15
|
+
* const src = new Uint8Array([9, 8, 7]);
|
16
|
+
* const dst = new Uint8Array([0, 1, 2, 3, 4, 5]);
|
17
|
+
* console.log(copy(src, dst)); // 3
|
18
|
+
* console.log(dst); // [9, 8, 7, 3, 4, 5]
|
19
|
+
* ```
|
20
|
+
*
|
21
|
+
* ```ts
|
22
|
+
* import { copy } from "@std/bytes/copy";
|
23
|
+
* const src = new Uint8Array([1, 1, 1, 1]);
|
24
|
+
* const dst = new Uint8Array([0, 0, 0, 0]);
|
25
|
+
* console.log(copy(src, dst, 1)); // 3
|
26
|
+
* console.log(dst); // [0, 1, 1, 1]
|
27
|
+
* ```
|
28
|
+
*/
|
29
|
+
export function copy(src, dst, off = 0) {
|
30
|
+
off = Math.max(0, Math.min(off, dst.byteLength));
|
31
|
+
const dstBytesAvailable = dst.byteLength - off;
|
32
|
+
if (src.byteLength > dstBytesAvailable) {
|
33
|
+
src = src.subarray(0, dstBytesAvailable);
|
34
|
+
}
|
35
|
+
dst.set(src, off);
|
36
|
+
return src.byteLength;
|
37
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/** Returns true if the suffix array appears at the end of the source array,
|
2
|
+
* false otherwise.
|
3
|
+
*
|
4
|
+
* The complexity of this function is O(suffix.length).
|
5
|
+
*
|
6
|
+
* ```ts
|
7
|
+
* import { endsWith } from "@std/bytes/ends_with";
|
8
|
+
* const source = new Uint8Array([0, 1, 2, 1, 2, 1, 2, 3]);
|
9
|
+
* const suffix = new Uint8Array([1, 2, 3]);
|
10
|
+
* console.log(endsWith(source, suffix)); // true
|
11
|
+
* ```
|
12
|
+
*/
|
13
|
+
export declare function endsWith(source: Uint8Array, suffix: Uint8Array): boolean;
|
14
|
+
//# sourceMappingURL=ends_with.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ends_with.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/0.220.1/ends_with.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAOxE"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
/** Returns true if the suffix array appears at the end of the source array,
|
4
|
+
* false otherwise.
|
5
|
+
*
|
6
|
+
* The complexity of this function is O(suffix.length).
|
7
|
+
*
|
8
|
+
* ```ts
|
9
|
+
* import { endsWith } from "@std/bytes/ends_with";
|
10
|
+
* const source = new Uint8Array([0, 1, 2, 1, 2, 1, 2, 3]);
|
11
|
+
* const suffix = new Uint8Array([1, 2, 3]);
|
12
|
+
* console.log(endsWith(source, suffix)); // true
|
13
|
+
* ```
|
14
|
+
*/
|
15
|
+
export function endsWith(source, suffix) {
|
16
|
+
let srci = source.length - 1;
|
17
|
+
let sfxi = suffix.length - 1;
|
18
|
+
for (; sfxi >= 0; srci--, sfxi--) {
|
19
|
+
if (source[srci] !== suffix[sfxi])
|
20
|
+
return false;
|
21
|
+
}
|
22
|
+
return true;
|
23
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/0.220.1/equals.ts"],"names":[],"mappings":"AAkCA;;;GAGG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,OAAO,CAK5D"}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
/** Check whether binary arrays are equal to each other using 8-bit comparisons.
|
4
|
+
* @private
|
5
|
+
* @param a first array to check equality
|
6
|
+
* @param b second array to check equality
|
7
|
+
*/
|
8
|
+
function equalsNaive(a, b) {
|
9
|
+
for (let i = 0; i < b.length; i++) {
|
10
|
+
if (a[i] !== b[i])
|
11
|
+
return false;
|
12
|
+
}
|
13
|
+
return true;
|
14
|
+
}
|
15
|
+
/** Check whether binary arrays are equal to each other using 32-bit comparisons.
|
16
|
+
* @private
|
17
|
+
* @param a first array to check equality
|
18
|
+
* @param b second array to check equality
|
19
|
+
*/
|
20
|
+
function equals32Bit(a, b) {
|
21
|
+
const len = a.length;
|
22
|
+
const compressible = Math.floor(len / 4);
|
23
|
+
const compressedA = new Uint32Array(a.buffer, 0, compressible);
|
24
|
+
const compressedB = new Uint32Array(b.buffer, 0, compressible);
|
25
|
+
for (let i = compressible * 4; i < len; i++) {
|
26
|
+
if (a[i] !== b[i])
|
27
|
+
return false;
|
28
|
+
}
|
29
|
+
for (let i = 0; i < compressedA.length; i++) {
|
30
|
+
if (compressedA[i] !== compressedB[i])
|
31
|
+
return false;
|
32
|
+
}
|
33
|
+
return true;
|
34
|
+
}
|
35
|
+
/** Check whether binary arrays are equal to each other.
|
36
|
+
* @param a first array to check equality
|
37
|
+
* @param b second array to check equality
|
38
|
+
*/
|
39
|
+
export function equals(a, b) {
|
40
|
+
if (a.length !== b.length) {
|
41
|
+
return false;
|
42
|
+
}
|
43
|
+
return a.length < 1000 ? equalsNaive(a, b) : equals32Bit(a, b);
|
44
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/** Returns true if the source array contains the needle array, false otherwise.
|
2
|
+
*
|
3
|
+
* A start index can be specified as the third argument that begins the search
|
4
|
+
* at that given index. The start index defaults to the beginning of the array.
|
5
|
+
*
|
6
|
+
* The complexity of this function is O(source.length * needle.length).
|
7
|
+
*
|
8
|
+
* ```ts
|
9
|
+
* import { includesNeedle } from "@std/bytes/includes_needle";
|
10
|
+
* const source = new Uint8Array([0, 1, 2, 1, 2, 1, 2, 3]);
|
11
|
+
* const needle = new Uint8Array([1, 2]);
|
12
|
+
* console.log(includesNeedle(source, needle)); // true
|
13
|
+
* console.log(includesNeedle(source, needle, 6)); // false
|
14
|
+
* ```
|
15
|
+
*/
|
16
|
+
export declare function includesNeedle(source: Uint8Array, needle: Uint8Array, start?: number): boolean;
|
17
|
+
//# sourceMappingURL=includes_needle.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"includes_needle.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/0.220.1/includes_needle.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,KAAK,SAAI,GACR,OAAO,CAET"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
import { indexOfNeedle } from "./index_of_needle.js";
|
4
|
+
/** Returns true if the source array contains the needle array, false otherwise.
|
5
|
+
*
|
6
|
+
* A start index can be specified as the third argument that begins the search
|
7
|
+
* at that given index. The start index defaults to the beginning of the array.
|
8
|
+
*
|
9
|
+
* The complexity of this function is O(source.length * needle.length).
|
10
|
+
*
|
11
|
+
* ```ts
|
12
|
+
* import { includesNeedle } from "@std/bytes/includes_needle";
|
13
|
+
* const source = new Uint8Array([0, 1, 2, 1, 2, 1, 2, 3]);
|
14
|
+
* const needle = new Uint8Array([1, 2]);
|
15
|
+
* console.log(includesNeedle(source, needle)); // true
|
16
|
+
* console.log(includesNeedle(source, needle, 6)); // false
|
17
|
+
* ```
|
18
|
+
*/
|
19
|
+
export function includesNeedle(source, needle, start = 0) {
|
20
|
+
return indexOfNeedle(source, needle, start) !== -1;
|
21
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/** Returns the index of the first occurrence of the needle array in the source
|
2
|
+
* array, or -1 if it is not present.
|
3
|
+
*
|
4
|
+
* A start index can be specified as the third argument that begins the search
|
5
|
+
* at that given index. The start index defaults to the start of the array.
|
6
|
+
*
|
7
|
+
* The complexity of this function is O(source.length * needle.length).
|
8
|
+
*
|
9
|
+
* ```ts
|
10
|
+
* import { indexOfNeedle } from "@std/bytes/index_of_needle";
|
11
|
+
* const source = new Uint8Array([0, 1, 2, 1, 2, 1, 2, 3]);
|
12
|
+
* const needle = new Uint8Array([1, 2]);
|
13
|
+
* console.log(indexOfNeedle(source, needle)); // 1
|
14
|
+
* console.log(indexOfNeedle(source, needle, 2)); // 3
|
15
|
+
* ```
|
16
|
+
*/
|
17
|
+
export declare function indexOfNeedle(source: Uint8Array, needle: Uint8Array, start?: number): number;
|
18
|
+
//# sourceMappingURL=index_of_needle.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index_of_needle.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/0.220.1/index_of_needle.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,KAAK,SAAI,GACR,MAAM,CAyBR"}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
/** Returns the index of the first occurrence of the needle array in the source
|
4
|
+
* array, or -1 if it is not present.
|
5
|
+
*
|
6
|
+
* A start index can be specified as the third argument that begins the search
|
7
|
+
* at that given index. The start index defaults to the start of the array.
|
8
|
+
*
|
9
|
+
* The complexity of this function is O(source.length * needle.length).
|
10
|
+
*
|
11
|
+
* ```ts
|
12
|
+
* import { indexOfNeedle } from "@std/bytes/index_of_needle";
|
13
|
+
* const source = new Uint8Array([0, 1, 2, 1, 2, 1, 2, 3]);
|
14
|
+
* const needle = new Uint8Array([1, 2]);
|
15
|
+
* console.log(indexOfNeedle(source, needle)); // 1
|
16
|
+
* console.log(indexOfNeedle(source, needle, 2)); // 3
|
17
|
+
* ```
|
18
|
+
*/
|
19
|
+
export function indexOfNeedle(source, needle, start = 0) {
|
20
|
+
if (start >= source.length) {
|
21
|
+
return -1;
|
22
|
+
}
|
23
|
+
if (start < 0) {
|
24
|
+
start = Math.max(0, source.length + start);
|
25
|
+
}
|
26
|
+
const s = needle[0];
|
27
|
+
for (let i = start; i < source.length; i++) {
|
28
|
+
if (source[i] !== s)
|
29
|
+
continue;
|
30
|
+
const pin = i;
|
31
|
+
let matched = 1;
|
32
|
+
let j = i;
|
33
|
+
while (matched < needle.length) {
|
34
|
+
j++;
|
35
|
+
if (source[j] !== needle[j - pin]) {
|
36
|
+
break;
|
37
|
+
}
|
38
|
+
matched++;
|
39
|
+
}
|
40
|
+
if (matched === needle.length) {
|
41
|
+
return pin;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
return -1;
|
45
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/** Returns the index of the last occurrence of the needle array in the source
|
2
|
+
* array, or -1 if it is not present.
|
3
|
+
*
|
4
|
+
* A start index can be specified as the third argument that begins the search
|
5
|
+
* at that given index. The start index defaults to the end of the array.
|
6
|
+
*
|
7
|
+
* The complexity of this function is O(source.length * needle.length).
|
8
|
+
*
|
9
|
+
* ```ts
|
10
|
+
* import { lastIndexOfNeedle } from "@std/bytes/last_index_of_needle";
|
11
|
+
* const source = new Uint8Array([0, 1, 2, 1, 2, 1, 2, 3]);
|
12
|
+
* const needle = new Uint8Array([1, 2]);
|
13
|
+
* console.log(lastIndexOfNeedle(source, needle)); // 5
|
14
|
+
* console.log(lastIndexOfNeedle(source, needle, 4)); // 3
|
15
|
+
* ```
|
16
|
+
*/
|
17
|
+
export declare function lastIndexOfNeedle(source: Uint8Array, needle: Uint8Array, start?: number): number;
|
18
|
+
//# sourceMappingURL=last_index_of_needle.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"last_index_of_needle.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/0.220.1/last_index_of_needle.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,KAAK,GAAE,MAA0B,GAChC,MAAM,CAyBR"}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
/** Returns the index of the last occurrence of the needle array in the source
|
4
|
+
* array, or -1 if it is not present.
|
5
|
+
*
|
6
|
+
* A start index can be specified as the third argument that begins the search
|
7
|
+
* at that given index. The start index defaults to the end of the array.
|
8
|
+
*
|
9
|
+
* The complexity of this function is O(source.length * needle.length).
|
10
|
+
*
|
11
|
+
* ```ts
|
12
|
+
* import { lastIndexOfNeedle } from "@std/bytes/last_index_of_needle";
|
13
|
+
* const source = new Uint8Array([0, 1, 2, 1, 2, 1, 2, 3]);
|
14
|
+
* const needle = new Uint8Array([1, 2]);
|
15
|
+
* console.log(lastIndexOfNeedle(source, needle)); // 5
|
16
|
+
* console.log(lastIndexOfNeedle(source, needle, 4)); // 3
|
17
|
+
* ```
|
18
|
+
*/
|
19
|
+
export function lastIndexOfNeedle(source, needle, start = source.length - 1) {
|
20
|
+
if (start < 0) {
|
21
|
+
return -1;
|
22
|
+
}
|
23
|
+
if (start >= source.length) {
|
24
|
+
start = source.length - 1;
|
25
|
+
}
|
26
|
+
const e = needle[needle.length - 1];
|
27
|
+
for (let i = start; i >= 0; i--) {
|
28
|
+
if (source[i] !== e)
|
29
|
+
continue;
|
30
|
+
const pin = i;
|
31
|
+
let matched = 1;
|
32
|
+
let j = i;
|
33
|
+
while (matched < needle.length) {
|
34
|
+
j--;
|
35
|
+
if (source[j] !== needle[needle.length - 1 - (pin - j)]) {
|
36
|
+
break;
|
37
|
+
}
|
38
|
+
matched++;
|
39
|
+
}
|
40
|
+
if (matched === needle.length) {
|
41
|
+
return pin - needle.length + 1;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
return -1;
|
45
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
/**
|
2
|
+
* Provides helper functions to manipulate `Uint8Array` byte slices that are not
|
3
|
+
* included on the `Uint8Array` prototype.
|
4
|
+
*
|
5
|
+
* ```ts
|
6
|
+
* import { concat } from "@std/bytes/concat";
|
7
|
+
*
|
8
|
+
* const a = new Uint8Array([0, 1, 2]);
|
9
|
+
* const b = new Uint8Array([3, 4, 5]);
|
10
|
+
* concat([a, b]); // Uint8Array(6) [ 0, 1, 2, 3, 4, 5 ]
|
11
|
+
* ```
|
12
|
+
*
|
13
|
+
* @module
|
14
|
+
*/
|
15
|
+
export * from "./concat.js";
|
16
|
+
export * from "./copy.js";
|
17
|
+
export * from "./ends_with.js";
|
18
|
+
export * from "./equals.js";
|
19
|
+
export * from "./includes_needle.js";
|
20
|
+
export * from "./index_of_needle.js";
|
21
|
+
export * from "./last_index_of_needle.js";
|
22
|
+
export * from "./repeat.js";
|
23
|
+
export * from "./starts_with.js";
|
24
|
+
//# sourceMappingURL=mod.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/0.220.1/mod.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;GAaG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
/**
|
4
|
+
* Provides helper functions to manipulate `Uint8Array` byte slices that are not
|
5
|
+
* included on the `Uint8Array` prototype.
|
6
|
+
*
|
7
|
+
* ```ts
|
8
|
+
* import { concat } from "@std/bytes/concat";
|
9
|
+
*
|
10
|
+
* const a = new Uint8Array([0, 1, 2]);
|
11
|
+
* const b = new Uint8Array([3, 4, 5]);
|
12
|
+
* concat([a, b]); // Uint8Array(6) [ 0, 1, 2, 3, 4, 5 ]
|
13
|
+
* ```
|
14
|
+
*
|
15
|
+
* @module
|
16
|
+
*/
|
17
|
+
export * from "./concat.js";
|
18
|
+
export * from "./copy.js";
|
19
|
+
export * from "./ends_with.js";
|
20
|
+
export * from "./equals.js";
|
21
|
+
export * from "./includes_needle.js";
|
22
|
+
export * from "./index_of_needle.js";
|
23
|
+
export * from "./last_index_of_needle.js";
|
24
|
+
export * from "./repeat.js";
|
25
|
+
export * from "./starts_with.js";
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/** Returns a new Uint8Array composed of `count` repetitions of the `source`
|
2
|
+
* array.
|
3
|
+
*
|
4
|
+
* If `count` is negative, a `RangeError` is thrown.
|
5
|
+
*
|
6
|
+
* ```ts
|
7
|
+
* import { repeat } from "@std/bytes/repeat";
|
8
|
+
* const source = new Uint8Array([0, 1, 2]);
|
9
|
+
* console.log(repeat(source, 3)); // [0, 1, 2, 0, 1, 2, 0, 1, 2]
|
10
|
+
* console.log(repeat(source, 0)); // []
|
11
|
+
* console.log(repeat(source, -1)); // RangeError
|
12
|
+
* ```
|
13
|
+
*/
|
14
|
+
export declare function repeat(source: Uint8Array, count: number): Uint8Array;
|
15
|
+
//# sourceMappingURL=repeat.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"repeat.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/0.220.1/repeat.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAsBpE"}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
import { copy } from "./copy.js";
|
4
|
+
/** Returns a new Uint8Array composed of `count` repetitions of the `source`
|
5
|
+
* array.
|
6
|
+
*
|
7
|
+
* If `count` is negative, a `RangeError` is thrown.
|
8
|
+
*
|
9
|
+
* ```ts
|
10
|
+
* import { repeat } from "@std/bytes/repeat";
|
11
|
+
* const source = new Uint8Array([0, 1, 2]);
|
12
|
+
* console.log(repeat(source, 3)); // [0, 1, 2, 0, 1, 2, 0, 1, 2]
|
13
|
+
* console.log(repeat(source, 0)); // []
|
14
|
+
* console.log(repeat(source, -1)); // RangeError
|
15
|
+
* ```
|
16
|
+
*/
|
17
|
+
export function repeat(source, count) {
|
18
|
+
if (count === 0) {
|
19
|
+
return new Uint8Array();
|
20
|
+
}
|
21
|
+
if (count < 0) {
|
22
|
+
throw new RangeError("bytes: negative repeat count");
|
23
|
+
}
|
24
|
+
if (!Number.isInteger(count)) {
|
25
|
+
throw new Error("bytes: repeat count must be an integer");
|
26
|
+
}
|
27
|
+
const nb = new Uint8Array(source.length * count);
|
28
|
+
let bp = copy(source, nb);
|
29
|
+
for (; bp < nb.length; bp *= 2) {
|
30
|
+
copy(nb.slice(0, bp), nb, bp);
|
31
|
+
}
|
32
|
+
return nb;
|
33
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/** Returns true if the prefix array appears at the start of the source array,
|
2
|
+
* false otherwise.
|
3
|
+
*
|
4
|
+
* The complexity of this function is O(prefix.length).
|
5
|
+
*
|
6
|
+
* ```ts
|
7
|
+
* import { startsWith } from "@std/bytes/starts_with";
|
8
|
+
* const source = new Uint8Array([0, 1, 2, 1, 2, 1, 2, 3]);
|
9
|
+
* const prefix = new Uint8Array([0, 1, 2]);
|
10
|
+
* console.log(startsWith(source, prefix)); // true
|
11
|
+
* ```
|
12
|
+
*/
|
13
|
+
export declare function startsWith(source: Uint8Array, prefix: Uint8Array): boolean;
|
14
|
+
//# sourceMappingURL=starts_with.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"starts_with.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/0.220.1/starts_with.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAK1E"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
/** Returns true if the prefix array appears at the start of the source array,
|
4
|
+
* false otherwise.
|
5
|
+
*
|
6
|
+
* The complexity of this function is O(prefix.length).
|
7
|
+
*
|
8
|
+
* ```ts
|
9
|
+
* import { startsWith } from "@std/bytes/starts_with";
|
10
|
+
* const source = new Uint8Array([0, 1, 2, 1, 2, 1, 2, 3]);
|
11
|
+
* const prefix = new Uint8Array([0, 1, 2]);
|
12
|
+
* console.log(startsWith(source, prefix)); // true
|
13
|
+
* ```
|
14
|
+
*/
|
15
|
+
export function startsWith(source, prefix) {
|
16
|
+
for (let i = 0; i < prefix.length; i++) {
|
17
|
+
if (source[i] !== prefix[i])
|
18
|
+
return false;
|
19
|
+
}
|
20
|
+
return true;
|
21
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"_util.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/encoding/0.220.1/_util.ts"],"names":[],"mappings":"AAeA,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAa9D"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
const encoder = new TextEncoder();
|
3
|
+
function getTypeName(value) {
|
4
|
+
const type = typeof value;
|
5
|
+
if (type !== "object") {
|
6
|
+
return type;
|
7
|
+
}
|
8
|
+
else if (value === null) {
|
9
|
+
return "null";
|
10
|
+
}
|
11
|
+
else {
|
12
|
+
return value?.constructor?.name ?? "object";
|
13
|
+
}
|
14
|
+
}
|
15
|
+
export function validateBinaryLike(source) {
|
16
|
+
if (typeof source === "string") {
|
17
|
+
return encoder.encode(source);
|
18
|
+
}
|
19
|
+
else if (source instanceof Uint8Array) {
|
20
|
+
return source;
|
21
|
+
}
|
22
|
+
else if (source instanceof ArrayBuffer) {
|
23
|
+
return new Uint8Array(source);
|
24
|
+
}
|
25
|
+
throw new TypeError(`The input must be a Uint8Array, a string, or an ArrayBuffer. Received a value of the type ${getTypeName(source)}.`);
|
26
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/**
|
2
|
+
* Converts data into a base64-encoded string.
|
3
|
+
*
|
4
|
+
* @see {@link https://datatracker.ietf.org/doc/html/rfc4648#section-4}
|
5
|
+
*
|
6
|
+
* @example
|
7
|
+
* ```ts
|
8
|
+
* import { encodeBase64 } from "@std/encoding/base64";
|
9
|
+
*
|
10
|
+
* encodeBase64("foobar"); // "Zm9vYmFy"
|
11
|
+
* ```
|
12
|
+
*/
|
13
|
+
export declare function encodeBase64(data: ArrayBuffer | Uint8Array | string): string;
|
14
|
+
/**
|
15
|
+
* Decodes a base64-encoded string.
|
16
|
+
*
|
17
|
+
* @see {@link https://datatracker.ietf.org/doc/html/rfc4648#section-4}
|
18
|
+
*
|
19
|
+
* @example
|
20
|
+
* ```ts
|
21
|
+
* import { encodeBase64 } from "@std/encoding/base64";
|
22
|
+
*
|
23
|
+
* encodeBase64("foobar"); // "Zm9vYmFy"
|
24
|
+
* ```
|
25
|
+
*/
|
26
|
+
export declare function decodeBase64(b64: string): Uint8Array;
|
27
|
+
//# sourceMappingURL=base64.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/encoding/0.220.1/base64.ts"],"names":[],"mappings":"AAkFA;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAmC5E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAQpD"}
|