structured-outputs 0.1.0-beta.20 → 0.1.0-beta.21
Sign up to get free protection for your applications and to get access to all the features.
- package/esm/ResponseFormat.d.ts +21 -0
- package/esm/ResponseFormat.d.ts.map +1 -0
- package/esm/ResponseFormat.js +43 -19
- package/esm/ResponseFormat.js.map +1 -1
- package/esm/oai.d.ts +5 -0
- package/esm/oai.d.ts.map +1 -0
- package/esm/oai.js +2 -0
- package/esm/oai.js.map +1 -0
- package/package.json +5 -10
- package/src/ResponseFormat.ts +48 -41
- package/src/oai.ts +5 -0
- package/esm/_dnt.shims.js +0 -58
- package/esm/_dnt.shims.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.js +0 -47
- package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.js +0 -47
- package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/assert.js +0 -23
- package/esm/deps/jsr.io/@std/assert/1.0.8/assert.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.js +0 -31
- package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/equal.js +0 -184
- package/esm/deps/jsr.io/@std/assert/1.0.8/equal.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/equals.js +0 -46
- package/esm/deps/jsr.io/@std/assert/1.0.8/equals.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/exists.js +0 -28
- package/esm/deps/jsr.io/@std/assert/1.0.8/exists.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/fail.js +0 -21
- package/esm/deps/jsr.io/@std/assert/1.0.8/fail.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/false.js +0 -23
- package/esm/deps/jsr.io/@std/assert/1.0.8/false.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater.js +0 -30
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js +0 -30
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.js +0 -53
- package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.js +0 -54
- package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/less.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.8/less.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js +0 -30
- package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/match.js +0 -27
- package/esm/deps/jsr.io/@std/assert/1.0.8/match.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/mod.js +0 -46
- package/esm/deps/jsr.io/@std/assert/1.0.8/mod.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.js +0 -33
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js +0 -30
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.js +0 -27
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js +0 -33
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.js +0 -160
- package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.js +0 -54
- package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.js +0 -58
- package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.js +0 -27
- package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/throws.js +0 -45
- package/esm/deps/jsr.io/@std/assert/1.0.8/throws.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.js +0 -21
- package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.js.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.js +0 -21
- package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.js.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js +0 -111
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js +0 -277
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js +0 -180
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.js +0 -38
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.js.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js +0 -208
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.js +0 -3
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.js.map +0 -1
- package/src/_dnt.shims.ts +0 -60
- package/src/deps/jsr.io/@std/assert/1.0.8/almost_equals.ts +0 -55
- package/src/deps/jsr.io/@std/assert/1.0.8/array_includes.ts +0 -57
- package/src/deps/jsr.io/@std/assert/1.0.8/assert.ts +0 -23
- package/src/deps/jsr.io/@std/assert/1.0.8/assertion_error.ts +0 -31
- package/src/deps/jsr.io/@std/assert/1.0.8/equal.ts +0 -210
- package/src/deps/jsr.io/@std/assert/1.0.8/equals.ts +0 -52
- package/src/deps/jsr.io/@std/assert/1.0.8/exists.ts +0 -31
- package/src/deps/jsr.io/@std/assert/1.0.8/fail.ts +0 -21
- package/src/deps/jsr.io/@std/assert/1.0.8/false.ts +0 -26
- package/src/deps/jsr.io/@std/assert/1.0.8/greater.ts +0 -30
- package/src/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.ts +0 -36
- package/src/deps/jsr.io/@std/assert/1.0.8/instance_of.ts +0 -64
- package/src/deps/jsr.io/@std/assert/1.0.8/is_error.ts +0 -65
- package/src/deps/jsr.io/@std/assert/1.0.8/less.ts +0 -29
- package/src/deps/jsr.io/@std/assert/1.0.8/less_or_equal.ts +0 -36
- package/src/deps/jsr.io/@std/assert/1.0.8/match.ts +0 -30
- package/src/deps/jsr.io/@std/assert/1.0.8/mod.ts +0 -47
- package/src/deps/jsr.io/@std/assert/1.0.8/not_equals.ts +0 -36
- package/src/deps/jsr.io/@std/assert/1.0.8/not_instance_of.ts +0 -33
- package/src/deps/jsr.io/@std/assert/1.0.8/not_match.ts +0 -30
- package/src/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.ts +0 -42
- package/src/deps/jsr.io/@std/assert/1.0.8/object_match.ts +0 -202
- package/src/deps/jsr.io/@std/assert/1.0.8/rejects.ts +0 -123
- package/src/deps/jsr.io/@std/assert/1.0.8/strict_equals.ts +0 -67
- package/src/deps/jsr.io/@std/assert/1.0.8/string_includes.ts +0 -30
- package/src/deps/jsr.io/@std/assert/1.0.8/throws.ts +0 -111
- package/src/deps/jsr.io/@std/assert/1.0.8/unimplemented.ts +0 -21
- package/src/deps/jsr.io/@std/assert/1.0.8/unreachable.ts +0 -21
- package/src/deps/jsr.io/@std/internal/1.0.5/build_message.ts +0 -134
- package/src/deps/jsr.io/@std/internal/1.0.5/diff.ts +0 -317
- package/src/deps/jsr.io/@std/internal/1.0.5/diff_str.ts +0 -204
- package/src/deps/jsr.io/@std/internal/1.0.5/format.ts +0 -39
- package/src/deps/jsr.io/@std/internal/1.0.5/styles.ts +0 -233
- package/src/deps/jsr.io/@std/internal/1.0.5/types.ts +0 -18
- package/types/ResponseFormat.d.ts +0 -26
- package/types/ResponseFormat.d.ts.map +0 -1
- package/types/_dnt.shims.d.ts +0 -2
- package/types/_dnt.shims.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts +0 -29
- package/types/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts +0 -24
- package/types/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/assert.d.ts +0 -16
- package/types/deps/jsr.io/@std/assert/1.0.8/assert.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts +0 -26
- package/types/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/equal.d.ts +0 -17
- package/types/deps/jsr.io/@std/assert/1.0.8/equal.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/equals.d.ts +0 -22
- package/types/deps/jsr.io/@std/assert/1.0.8/equals.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/exists.d.ts +0 -18
- package/types/deps/jsr.io/@std/assert/1.0.8/exists.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/fail.d.ts +0 -15
- package/types/deps/jsr.io/@std/assert/1.0.8/fail.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/false.d.ts +0 -18
- package/types/deps/jsr.io/@std/assert/1.0.8/false.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/greater.d.ts +0 -20
- package/types/deps/jsr.io/@std/assert/1.0.8/greater.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts +0 -20
- package/types/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts +0 -23
- package/types/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts +0 -25
- package/types/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/less.d.ts +0 -19
- package/types/deps/jsr.io/@std/assert/1.0.8/less.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts +0 -20
- package/types/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/match.d.ts +0 -18
- package/types/deps/jsr.io/@std/assert/1.0.8/match.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/mod.d.ts +0 -44
- package/types/deps/jsr.io/@std/assert/1.0.8/mod.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts +0 -21
- package/types/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts +0 -20
- package/types/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts +0 -18
- package/types/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts +0 -23
- package/types/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts +0 -28
- package/types/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts +0 -42
- package/types/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts +0 -24
- package/types/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts +0 -18
- package/types/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/throws.d.ts +0 -45
- package/types/deps/jsr.io/@std/assert/1.0.8/throws.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts +0 -15
- package/types/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts +0 -15
- package/types/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +0 -82
- package/types/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +0 -140
- package/types/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +0 -99
- package/types/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/internal/1.0.5/format.d.ts +0 -2
- package/types/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +0 -159
- package/types/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/internal/1.0.5/types.d.ts +0 -16
- package/types/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
- /package/{types → esm}/Tool.d.ts +0 -0
- /package/{types → esm}/Tool.d.ts.map +0 -0
- /package/{types → esm}/_dnt.polyfills.d.ts +0 -0
- /package/{types → esm}/_dnt.polyfills.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/_utils.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/_utils.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/associate_by.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/associate_by.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/associate_with.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/associate_with.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/chunk.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/chunk.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/deep_merge.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/deep_merge.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/distinct.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/distinct.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/distinct_by.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/distinct_by.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/drop_last_while.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/drop_last_while.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/drop_while.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/drop_while.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/filter_entries.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/filter_entries.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/filter_keys.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/filter_keys.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/filter_values.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/filter_values.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/find_single.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/find_single.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/includes_value.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/includes_value.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/intersect.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/intersect.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/invert.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/invert.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/invert_by.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/invert_by.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/join_to_string.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/join_to_string.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/map_entries.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/map_entries.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/map_keys.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/map_keys.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/map_values.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/map_values.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/max_by.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/max_by.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/max_of.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/max_of.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/max_with.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/max_with.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/min_by.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/min_by.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/min_of.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/min_of.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/min_with.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/min_with.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/mod.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/mod.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/omit.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/omit.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/partition.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/partition.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/partition_entries.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/partition_entries.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/permutations.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/permutations.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/pick.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/pick.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/reduce_groups.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/reduce_groups.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/running_reduce.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/running_reduce.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/sample.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/sample.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/sliding_windows.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/sliding_windows.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/sort_by.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/sort_by.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/sum_of.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/sum_of.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/take_last_while.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/take_last_while.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/take_while.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/take_while.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/union.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/union.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/unzip.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/unzip.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/without_all.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/without_all.d.ts.map +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/zip.d.ts +0 -0
- /package/{types → esm}/deps/jsr.io/@std/collections/1.0.9/zip.d.ts.map +0 -0
- /package/{types → esm}/mod.d.ts +0 -0
- /package/{types → esm}/mod.d.ts.map +0 -0
- /package/{types → esm}/types/Ref.d.ts +0 -0
- /package/{types → esm}/types/Ref.d.ts.map +0 -0
- /package/{types → esm}/types/RootTy.d.ts +0 -0
- /package/{types → esm}/types/RootTy.d.ts.map +0 -0
- /package/{types → esm}/types/Ty.d.ts +0 -0
- /package/{types → esm}/types/Ty.d.ts.map +0 -0
- /package/{types → esm}/types/array.d.ts +0 -0
- /package/{types → esm}/types/array.d.ts.map +0 -0
- /package/{types → esm}/types/constant.d.ts +0 -0
- /package/{types → esm}/types/constant.d.ts.map +0 -0
- /package/{types → esm}/types/constantUnion.d.ts +0 -0
- /package/{types → esm}/types/constantUnion.d.ts.map +0 -0
- /package/{types → esm}/types/leaves.d.ts +0 -0
- /package/{types → esm}/types/leaves.d.ts.map +0 -0
- /package/{types → esm}/types/mod.d.ts +0 -0
- /package/{types → esm}/types/mod.d.ts.map +0 -0
- /package/{types → esm}/types/object.d.ts +0 -0
- /package/{types → esm}/types/object.d.ts.map +0 -0
- /package/{types → esm}/types/std/Option.d.ts +0 -0
- /package/{types → esm}/types/std/Option.d.ts.map +0 -0
- /package/{types → esm}/types/std/Wrapper.d.ts +0 -0
- /package/{types → esm}/types/std/Wrapper.d.ts.map +0 -0
- /package/{types → esm}/types/std/mod.d.ts +0 -0
- /package/{types → esm}/types/std/mod.d.ts.map +0 -0
- /package/{types → esm}/types/taggedUnion.d.ts +0 -0
- /package/{types → esm}/types/taggedUnion.d.ts.map +0 -0
- /package/{types → esm}/util/phantoms.d.ts +0 -0
- /package/{types → esm}/util/phantoms.d.ts.map +0 -0
- /package/{types → esm}/util/recombineTaggedTemplateArgs.d.ts +0 -0
- /package/{types → esm}/util/recombineTaggedTemplateArgs.d.ts.map +0 -0
@@ -1,184 +0,0 @@
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
-
// This module is browser compatible.
|
3
|
-
import * as dntShim from "../../../../../_dnt.shims.js";
|
4
|
-
function isKeyedCollection(x) {
|
5
|
-
return x instanceof Set || x instanceof Map;
|
6
|
-
}
|
7
|
-
function prototypesEqual(a, b) {
|
8
|
-
const pa = Object.getPrototypeOf(a);
|
9
|
-
const pb = Object.getPrototypeOf(b);
|
10
|
-
return pa === pb ||
|
11
|
-
pa === Object.prototype && pb === null ||
|
12
|
-
pa === null && pb === Object.prototype;
|
13
|
-
}
|
14
|
-
function isBasicObjectOrArray(obj) {
|
15
|
-
const proto = Object.getPrototypeOf(obj);
|
16
|
-
return proto === null || proto === Object.prototype ||
|
17
|
-
proto === Array.prototype;
|
18
|
-
}
|
19
|
-
// Slightly faster than Reflect.ownKeys in V8 as of 12.9.202.13-rusty (2024-10-28)
|
20
|
-
function ownKeys(obj) {
|
21
|
-
return [
|
22
|
-
...Object.getOwnPropertyNames(obj),
|
23
|
-
...Object.getOwnPropertySymbols(obj),
|
24
|
-
];
|
25
|
-
}
|
26
|
-
function getKeysDeep(obj) {
|
27
|
-
const keys = new Set();
|
28
|
-
while (obj !== Object.prototype && obj !== Array.prototype && obj != null) {
|
29
|
-
for (const key of ownKeys(obj)) {
|
30
|
-
keys.add(key);
|
31
|
-
}
|
32
|
-
obj = Object.getPrototypeOf(obj);
|
33
|
-
}
|
34
|
-
return keys;
|
35
|
-
}
|
36
|
-
// deno-lint-ignore no-explicit-any
|
37
|
-
const Temporal = dntShim.dntGlobalThis.Temporal ??
|
38
|
-
new Proxy({}, { get: () => { } });
|
39
|
-
/** A non-exhaustive list of prototypes that can be accurately fast-path compared with `String(instance)` */
|
40
|
-
const stringComparablePrototypes = new Set([
|
41
|
-
Intl.Locale,
|
42
|
-
RegExp,
|
43
|
-
Temporal.Duration,
|
44
|
-
Temporal.Instant,
|
45
|
-
Temporal.PlainDate,
|
46
|
-
Temporal.PlainDateTime,
|
47
|
-
Temporal.PlainTime,
|
48
|
-
Temporal.PlainYearMonth,
|
49
|
-
Temporal.PlainMonthDay,
|
50
|
-
Temporal.ZonedDateTime,
|
51
|
-
URL,
|
52
|
-
URLSearchParams,
|
53
|
-
].filter((x) => x != null).map((x) => x.prototype));
|
54
|
-
function isPrimitive(x) {
|
55
|
-
return typeof x === "string" ||
|
56
|
-
typeof x === "number" ||
|
57
|
-
typeof x === "boolean" ||
|
58
|
-
typeof x === "bigint" ||
|
59
|
-
typeof x === "symbol" ||
|
60
|
-
x == null;
|
61
|
-
}
|
62
|
-
const TypedArray = Object.getPrototypeOf(Uint8Array);
|
63
|
-
function compareTypedArrays(a, b) {
|
64
|
-
if (a.length !== b.length)
|
65
|
-
return false;
|
66
|
-
for (let i = 0; i < b.length; i++) {
|
67
|
-
if (!sameValueZero(a[i], b[i]))
|
68
|
-
return false;
|
69
|
-
}
|
70
|
-
return true;
|
71
|
-
}
|
72
|
-
/** Check both strict equality (`0 == -0`) and `Object.is` (`NaN == NaN`) */
|
73
|
-
function sameValueZero(a, b) {
|
74
|
-
return a === b || Object.is(a, b);
|
75
|
-
}
|
76
|
-
/**
|
77
|
-
* Deep equality comparison used in assertions.
|
78
|
-
*
|
79
|
-
* @param a The actual value
|
80
|
-
* @param b The expected value
|
81
|
-
* @returns `true` if the values are deeply equal, `false` otherwise
|
82
|
-
*
|
83
|
-
* @example Usage
|
84
|
-
* ```ts
|
85
|
-
* import { equal } from "@std/assert/equal";
|
86
|
-
*
|
87
|
-
* equal({ foo: "bar" }, { foo: "bar" }); // Returns `true`
|
88
|
-
* equal({ foo: "bar" }, { foo: "baz" }); // Returns `false`
|
89
|
-
* ```
|
90
|
-
*/
|
91
|
-
export function equal(a, b) {
|
92
|
-
const seen = new Map();
|
93
|
-
return (function compare(a, b) {
|
94
|
-
if (sameValueZero(a, b))
|
95
|
-
return true;
|
96
|
-
if (isPrimitive(a) || isPrimitive(b))
|
97
|
-
return false;
|
98
|
-
if (a instanceof Date && b instanceof Date) {
|
99
|
-
return Object.is(a.getTime(), b.getTime());
|
100
|
-
}
|
101
|
-
if (a && typeof a === "object" && b && typeof b === "object") {
|
102
|
-
if (!prototypesEqual(a, b)) {
|
103
|
-
return false;
|
104
|
-
}
|
105
|
-
if (a instanceof TypedArray) {
|
106
|
-
return compareTypedArrays(a, b);
|
107
|
-
}
|
108
|
-
if (a instanceof WeakMap) {
|
109
|
-
throw new TypeError("cannot compare WeakMap instances");
|
110
|
-
}
|
111
|
-
if (a instanceof WeakSet) {
|
112
|
-
throw new TypeError("cannot compare WeakSet instances");
|
113
|
-
}
|
114
|
-
if (a instanceof WeakRef) {
|
115
|
-
return compare(a.deref(), b.deref());
|
116
|
-
}
|
117
|
-
if (seen.get(a) === b) {
|
118
|
-
return true;
|
119
|
-
}
|
120
|
-
if (Object.keys(a).length !== Object.keys(b).length) {
|
121
|
-
return false;
|
122
|
-
}
|
123
|
-
seen.set(a, b);
|
124
|
-
if (isKeyedCollection(a) && isKeyedCollection(b)) {
|
125
|
-
if (a.size !== b.size) {
|
126
|
-
return false;
|
127
|
-
}
|
128
|
-
const aKeys = [...a.keys()];
|
129
|
-
const primitiveKeysFastPath = aKeys.every(isPrimitive);
|
130
|
-
if (primitiveKeysFastPath) {
|
131
|
-
if (a instanceof Set) {
|
132
|
-
return a.symmetricDifference(b).size === 0;
|
133
|
-
}
|
134
|
-
for (const key of aKeys) {
|
135
|
-
if (!b.has(key) ||
|
136
|
-
!compare(a.get(key), b.get(key))) {
|
137
|
-
return false;
|
138
|
-
}
|
139
|
-
}
|
140
|
-
return true;
|
141
|
-
}
|
142
|
-
let unmatchedEntries = a.size;
|
143
|
-
for (const [aKey, aValue] of a.entries()) {
|
144
|
-
for (const [bKey, bValue] of b.entries()) {
|
145
|
-
/* Given that Map keys can be references, we need
|
146
|
-
* to ensure that they are also deeply equal */
|
147
|
-
if (!compare(aKey, bKey))
|
148
|
-
continue;
|
149
|
-
if ((aKey === aValue && bKey === bValue) ||
|
150
|
-
(compare(aValue, bValue))) {
|
151
|
-
unmatchedEntries--;
|
152
|
-
break;
|
153
|
-
}
|
154
|
-
}
|
155
|
-
}
|
156
|
-
return unmatchedEntries === 0;
|
157
|
-
}
|
158
|
-
let keys;
|
159
|
-
if (isBasicObjectOrArray(a)) {
|
160
|
-
// fast path
|
161
|
-
keys = ownKeys({ ...a, ...b });
|
162
|
-
}
|
163
|
-
else if (stringComparablePrototypes.has(Object.getPrototypeOf(a))) {
|
164
|
-
// medium path
|
165
|
-
return String(a) === String(b);
|
166
|
-
}
|
167
|
-
else {
|
168
|
-
// slow path
|
169
|
-
keys = getKeysDeep(a).union(getKeysDeep(b));
|
170
|
-
}
|
171
|
-
for (const key of keys) {
|
172
|
-
if (!compare(a[key], b[key])) {
|
173
|
-
return false;
|
174
|
-
}
|
175
|
-
if (((key in a) && (!(key in b))) || ((key in b) && (!(key in a)))) {
|
176
|
-
return false;
|
177
|
-
}
|
178
|
-
}
|
179
|
-
return true;
|
180
|
-
}
|
181
|
-
return false;
|
182
|
-
})(a, b);
|
183
|
-
}
|
184
|
-
//# sourceMappingURL=equal.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"equal.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/equal.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AAIxD,SAAS,iBAAiB,CAAC,CAAU;IACnC,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,GAAG,CAAC;AAC9C,CAAC;AAED,SAAS,eAAe,CAAC,CAAS,EAAE,CAAS;IAC3C,MAAM,EAAE,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IACpC,MAAM,EAAE,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IACpC,OAAO,EAAE,KAAK,EAAE;QACd,EAAE,KAAK,MAAM,CAAC,SAAS,IAAI,EAAE,KAAK,IAAI;QACtC,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,MAAM,CAAC,SAAS,CAAC;AAC3C,CAAC;AAED,SAAS,oBAAoB,CAAC,GAAW;IACvC,MAAM,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IACzC,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,MAAM,CAAC,SAAS;QACjD,KAAK,KAAK,KAAK,CAAC,SAAS,CAAC;AAC9B,CAAC;AAED,kFAAkF;AAClF,SAAS,OAAO,CAAC,GAAW;IAC1B,OAAO;QACL,GAAG,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC;QAClC,GAAG,MAAM,CAAC,qBAAqB,CAAC,GAAG,CAAC;KACrC,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,GAAW;IAC9B,MA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,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;YACjC,CAAC;iBAAM,IAAI,0BAA0B,CAAC,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBACpE,cAAc;gBACd,OAAO,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC;YACjC,CAAC;iBAAM,CAAC;gBACN,YAAY;gBACZ,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9C,CAAC;YAED,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;gBAEvB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAU,CAAC,EAAE,CAAC,CAAC,GAAU,CAAC,CAAC,EAAE,CAAC;oBAC3C,OAAO,KAAK,CAAC;gBACf,CAAC;gBACD,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;oBACnE,OAAO,KAAK,CAAC;gBACf,CAAC;YACH,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACX,CAAC"}
|
@@ -1,46 +0,0 @@
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
-
// This module is browser compatible.
|
3
|
-
import { equal } from "./equal.js";
|
4
|
-
import { buildMessage } from "../../internal/1.0.5/build_message.js";
|
5
|
-
import { diff } from "../../internal/1.0.5/diff.js";
|
6
|
-
import { diffStr } from "../../internal/1.0.5/diff_str.js";
|
7
|
-
import { format } from "../../internal/1.0.5/format.js";
|
8
|
-
import { AssertionError } from "./assertion_error.js";
|
9
|
-
/**
|
10
|
-
* Make an assertion that `actual` and `expected` are equal, deeply. If not
|
11
|
-
* deeply equal, then throw.
|
12
|
-
*
|
13
|
-
* Type parameter can be specified to ensure values under comparison have the
|
14
|
-
* same type.
|
15
|
-
*
|
16
|
-
* @example Usage
|
17
|
-
* ```ts ignore
|
18
|
-
* import { assertEquals } from "@std/assert";
|
19
|
-
*
|
20
|
-
* assertEquals("world", "world"); // Doesn't throw
|
21
|
-
* assertEquals("hello", "world"); // Throws
|
22
|
-
* ```
|
23
|
-
*
|
24
|
-
* @typeParam T The type of the values to compare. This is usually inferred.
|
25
|
-
* @param actual The actual value to compare.
|
26
|
-
* @param expected The expected value to compare.
|
27
|
-
* @param msg The optional message to display if the assertion fails.
|
28
|
-
*/
|
29
|
-
export function assertEquals(actual, expected, msg) {
|
30
|
-
if (equal(actual, expected)) {
|
31
|
-
return;
|
32
|
-
}
|
33
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
34
|
-
let message = `Values are not equal${msgSuffix}`;
|
35
|
-
const actualString = format(actual);
|
36
|
-
const expectedString = format(expected);
|
37
|
-
const stringDiff = (typeof actual === "string") &&
|
38
|
-
(typeof expected === "string");
|
39
|
-
const diffResult = stringDiff
|
40
|
-
? diffStr(actual, expected)
|
41
|
-
: diff(actualString.split("\n"), expectedString.split("\n"));
|
42
|
-
const diffMsg = buildMessage(diffResult, { stringDiff }).join("\n");
|
43
|
-
message = `${message}\n${diffMsg}`;
|
44
|
-
throw new AssertionError(message);
|
45
|
-
}
|
46
|
-
//# sourceMappingURL=equals.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"equals.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/equals.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,YAA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;AACpC,CAAC"}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
-
// This module is browser compatible.
|
3
|
-
import { AssertionError } from "./assertion_error.js";
|
4
|
-
/**
|
5
|
-
* Make an assertion that actual is not null or undefined.
|
6
|
-
* If not then throw.
|
7
|
-
*
|
8
|
-
* @example Usage
|
9
|
-
* ```ts ignore
|
10
|
-
* import { assertExists } from "@std/assert";
|
11
|
-
*
|
12
|
-
* assertExists("something"); // Doesn't throw
|
13
|
-
* assertExists(undefined); // Throws
|
14
|
-
* ```
|
15
|
-
*
|
16
|
-
* @typeParam T The type of the actual value.
|
17
|
-
* @param actual The actual value to check.
|
18
|
-
* @param msg The optional message to include in the error if the assertion fails.
|
19
|
-
*/
|
20
|
-
export function assertExists(actual, msg) {
|
21
|
-
if (actual === undefined || actual === null) {
|
22
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
23
|
-
msg =
|
24
|
-
`Expected actual: "${actual}" to not be null or undefined${msgSuffix}`;
|
25
|
-
throw new AssertionError(msg);
|
26
|
-
}
|
27
|
-
}
|
28
|
-
//# sourceMappingURL=exists.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"exists.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/exists.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,YAAY,CAC1B,MAAS,EACT,GAAY;IAEZ,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QAC5C,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;QACzC,GAAG;YACD,qBAAqB,MAAM,gCAAgC,SAAS,EAAE,CAAC;QACzE,MAAM,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;AACH,CAAC"}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
-
// This module is browser compatible.
|
3
|
-
import { AssertionError } from "./assertion_error.js";
|
4
|
-
/**
|
5
|
-
* Forcefully throws a failed assertion.
|
6
|
-
*
|
7
|
-
* @example Usage
|
8
|
-
* ```ts ignore
|
9
|
-
* import { fail } from "@std/assert";
|
10
|
-
*
|
11
|
-
* fail("Deliberately failed!"); // Throws
|
12
|
-
* ```
|
13
|
-
*
|
14
|
-
* @param msg Optional message to include in the error.
|
15
|
-
* @returns Never returns, always throws.
|
16
|
-
*/
|
17
|
-
export function fail(msg) {
|
18
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
19
|
-
throw new AssertionError(`Failed assertion${msgSuffix}`);
|
20
|
-
}
|
21
|
-
//# sourceMappingURL=fail.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"fail.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/fail.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,IAAI,CAAC,GAAY;IAC/B,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IACzC,MAAM,IAAI,cAAc,CAAC,mBAAmB,SAAS,EAAE,CAAC,CAAC;AAC3D,CAAC"}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
-
// This module is browser compatible.
|
3
|
-
import { AssertionError } from "./assertion_error.js";
|
4
|
-
/**
|
5
|
-
* Make an assertion, error will be thrown if `expr` have truthy value.
|
6
|
-
*
|
7
|
-
* @example Usage
|
8
|
-
* ```ts ignore
|
9
|
-
* import { assertFalse } from "@std/assert";
|
10
|
-
*
|
11
|
-
* assertFalse(false); // Doesn't throw
|
12
|
-
* assertFalse(true); // Throws
|
13
|
-
* ```
|
14
|
-
*
|
15
|
-
* @param expr The expression to test.
|
16
|
-
* @param msg The optional message to display if the assertion fails.
|
17
|
-
*/
|
18
|
-
export function assertFalse(expr, msg = "") {
|
19
|
-
if (expr) {
|
20
|
-
throw new AssertionError(msg);
|
21
|
-
}
|
22
|
-
}
|
23
|
-
//# sourceMappingURL=false.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"false.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/false.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAKtD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,IAAa,EAAE,GAAG,GAAG,EAAE;IACjD,IAAI,IAAI,EAAE,CAAC;QACT,MAAM,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;AACH,CAAC"}
|
@@ -1,30 +0,0 @@
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
-
// This module is browser compatible.
|
3
|
-
import { format } from "../../internal/1.0.5/format.js";
|
4
|
-
import { AssertionError } from "./assertion_error.js";
|
5
|
-
/**
|
6
|
-
* Make an assertion that `actual` is greater than `expected`.
|
7
|
-
* If not then throw.
|
8
|
-
*
|
9
|
-
* @example Usage
|
10
|
-
* ```ts ignore
|
11
|
-
* import { assertGreater } from "@std/assert";
|
12
|
-
*
|
13
|
-
* assertGreater(2, 1); // Doesn't throw
|
14
|
-
* assertGreater(1, 1); // Throws
|
15
|
-
* assertGreater(0, 1); // Throws
|
16
|
-
* ```
|
17
|
-
*
|
18
|
-
* @typeParam T The type of the values to compare.
|
19
|
-
* @param actual The actual value to compare.
|
20
|
-
* @param expected The expected value to compare.
|
21
|
-
* @param msg The optional message to display if the assertion fails.
|
22
|
-
*/
|
23
|
-
export function assertGreater(actual, expected, msg) {
|
24
|
-
if (actual > expected)
|
25
|
-
return;
|
26
|
-
const actualString = format(actual);
|
27
|
-
const expectedString = format(expected);
|
28
|
-
throw new AssertionError(msg ?? `Expect ${actualString} > ${expectedString}`);
|
29
|
-
}
|
30
|
-
//# sourceMappingURL=greater.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"greater.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/greater.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,aAAa,CAAI,MAAS,EAAE,QAAW,EAAE,GAAY;IACnE,IAAI,MAAM,GAAG,QAAQ;QAAE,OAAO;IAE9B,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IACxC,MAAM,IAAI,cAAc,CAAC,GAAG,IAAI,UAAU,YAAY,MAAM,cAAc,EAAE,CAAC,CAAC;AAChF,CAAC"}
|
@@ -1,30 +0,0 @@
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
-
// This module is browser compatible.
|
3
|
-
import { format } from "../../internal/1.0.5/format.js";
|
4
|
-
import { AssertionError } from "./assertion_error.js";
|
5
|
-
/**
|
6
|
-
* Make an assertion that `actual` is greater than or equal to `expected`.
|
7
|
-
* If not then throw.
|
8
|
-
*
|
9
|
-
* @example Usage
|
10
|
-
* ```ts ignore
|
11
|
-
* import { assertGreaterOrEqual } from "@std/assert";
|
12
|
-
*
|
13
|
-
* assertGreaterOrEqual(2, 1); // Doesn't throw
|
14
|
-
* assertGreaterOrEqual(1, 1); // Doesn't throw
|
15
|
-
* assertGreaterOrEqual(0, 1); // Throws
|
16
|
-
* ```
|
17
|
-
*
|
18
|
-
* @typeParam T The type of the values to compare.
|
19
|
-
* @param actual The actual value to compare.
|
20
|
-
* @param expected The expected value to compare.
|
21
|
-
* @param msg The optional message to display if the assertion fails.
|
22
|
-
*/
|
23
|
-
export function assertGreaterOrEqual(actual, expected, msg) {
|
24
|
-
if (actual >= expected)
|
25
|
-
return;
|
26
|
-
const actualString = format(actual);
|
27
|
-
const expectedString = format(expected);
|
28
|
-
throw new AssertionError(msg ?? `Expect ${actualString} >= ${expectedString}`);
|
29
|
-
}
|
30
|
-
//# sourceMappingURL=greater_or_equal.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"greater_or_equal.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAS,EACT,QAAW,EACX,GAAY;IAEZ,IAAI,MAAM,IAAI,QAAQ;QAAE,OAAO;IAE/B,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IACxC,MAAM,IAAI,cAAc,CACtB,GAAG,IAAI,UAAU,YAAY,OAAO,cAAc,EAAE,CACrD,CAAC;AACJ,CAAC"}
|
@@ -1,53 +0,0 @@
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
-
// This module is browser compatible.
|
3
|
-
import { AssertionError } from "./assertion_error.js";
|
4
|
-
/**
|
5
|
-
* Make an assertion that `obj` is an instance of `type`.
|
6
|
-
* If not then throw.
|
7
|
-
*
|
8
|
-
* @example Usage
|
9
|
-
* ```ts ignore
|
10
|
-
* import { assertInstanceOf } from "@std/assert";
|
11
|
-
*
|
12
|
-
* assertInstanceOf(new Date(), Date); // Doesn't throw
|
13
|
-
* assertInstanceOf(new Date(), Number); // Throws
|
14
|
-
* ```
|
15
|
-
*
|
16
|
-
* @typeParam T The expected type of the object.
|
17
|
-
* @param actual The object to check.
|
18
|
-
* @param expectedType The expected class constructor.
|
19
|
-
* @param msg The optional message to display if the assertion fails.
|
20
|
-
*/
|
21
|
-
export function assertInstanceOf(actual, expectedType, msg = "") {
|
22
|
-
if (actual instanceof expectedType)
|
23
|
-
return;
|
24
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
25
|
-
const expectedTypeStr = expectedType.name;
|
26
|
-
let actualTypeStr = "";
|
27
|
-
if (actual === null) {
|
28
|
-
actualTypeStr = "null";
|
29
|
-
}
|
30
|
-
else if (actual === undefined) {
|
31
|
-
actualTypeStr = "undefined";
|
32
|
-
}
|
33
|
-
else if (typeof actual === "object") {
|
34
|
-
actualTypeStr = actual.constructor?.name ?? "Object";
|
35
|
-
}
|
36
|
-
else {
|
37
|
-
actualTypeStr = typeof actual;
|
38
|
-
}
|
39
|
-
if (expectedTypeStr === actualTypeStr) {
|
40
|
-
msg =
|
41
|
-
`Expected object to be an instance of "${expectedTypeStr}"${msgSuffix}`;
|
42
|
-
}
|
43
|
-
else if (actualTypeStr === "function") {
|
44
|
-
msg =
|
45
|
-
`Expected object to be an instance of "${expectedTypeStr}" but was not an instanced object${msgSuffix}`;
|
46
|
-
}
|
47
|
-
else {
|
48
|
-
msg =
|
49
|
-
`Expected object to be an instance of "${expectedTypeStr}" but was "${actualTypeStr}"${msgSuffix}`;
|
50
|
-
}
|
51
|
-
throw new AssertionError(msg);
|
52
|
-
}
|
53
|
-
//# sourceMappingURL=instance_of.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"instance_of.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/instance_of.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAQtD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,gBAAgB,CAI9B,MAAe,EACf,YAAe,EACf,GAAG,GAAG,EAAE;IAER,IAAI,MAAM,YAAY,YAAY;QAAE,OAAO;IAE3C,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IACzC,MAAM,eAAe,GAAG,YAAY,CAAC,IAAI,CAAC;IAE1C,IAAI,aAAa,GAAG,EAAE,CAAC;IACvB,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACpB,aAAa,GAAG,MAAM,CAAC;IACzB,CAAC;SAAM,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAChC,aAAa,GAAG,WAAW,CAAC;IAC9B,CAAC;SAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QACtC,aAAa,GAAG,MAAM,CAAC,WAAW,EAAE,IAAI,IAAI,QAAQ,CAAC;IACvD,CAAC;SAAM,CAAC;QACN,aAAa,GAAG,OAAO,MAAM,CAAC;IAChC,CAAC;IAED,IAAI,eAAe,KAAK,aAAa,EAAE,CAAC;QACtC,GAAG;YACD,yCAAyC,eAAe,IAAI,SAAS,EAAE,CAAC;IAC5E,CAAC;SAAM,IAAI,aAAa,KAAK,UAAU,EAAE,CAAC;QACxC,GAAG;YACD,yCAAyC,eAAe,oCAAoC,SAAS,EAAE,CAAC;IAC5G,CAAC;SAAM,CAAC;QACN,GAAG;YACD,yCAAyC,eAAe,cAAc,aAAa,IAAI,SAAS,EAAE,CAAC;IACvG,CAAC;IAED,MAAM,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC"}
|
@@ -1,54 +0,0 @@
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
-
// This module is browser compatible.
|
3
|
-
import { AssertionError } from "./assertion_error.js";
|
4
|
-
import { stripAnsiCode } from "../../internal/1.0.5/styles.js";
|
5
|
-
/**
|
6
|
-
* Make an assertion that `error` is an `Error`.
|
7
|
-
* If not then an error will be thrown.
|
8
|
-
* An error class and a string that should be included in the
|
9
|
-
* error message can also be asserted.
|
10
|
-
*
|
11
|
-
* @example Usage
|
12
|
-
* ```ts ignore
|
13
|
-
* import { assertIsError } from "@std/assert";
|
14
|
-
*
|
15
|
-
* assertIsError(null); // Throws
|
16
|
-
* assertIsError(new RangeError("Out of range")); // Doesn't throw
|
17
|
-
* assertIsError(new RangeError("Out of range"), SyntaxError); // Throws
|
18
|
-
* assertIsError(new RangeError("Out of range"), SyntaxError, "Out of range"); // Doesn't throw
|
19
|
-
* assertIsError(new RangeError("Out of range"), SyntaxError, "Within range"); // Throws
|
20
|
-
* ```
|
21
|
-
*
|
22
|
-
* @typeParam E The type of the error to assert.
|
23
|
-
* @param error The error to assert.
|
24
|
-
* @param ErrorClass The optional error class to assert.
|
25
|
-
* @param msgMatches The optional string or RegExp to assert in the error message.
|
26
|
-
* @param msg The optional message to display if the assertion fails.
|
27
|
-
*/
|
28
|
-
export function assertIsError(error,
|
29
|
-
// deno-lint-ignore no-explicit-any
|
30
|
-
ErrorClass, msgMatches, msg) {
|
31
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
32
|
-
if (!(error instanceof Error)) {
|
33
|
-
throw new AssertionError(`Expected "error" to be an Error object${msgSuffix}`);
|
34
|
-
}
|
35
|
-
if (ErrorClass && !(error instanceof ErrorClass)) {
|
36
|
-
msg =
|
37
|
-
`Expected error to be instance of "${ErrorClass.name}", but was "${error?.constructor?.name}"${msgSuffix}`;
|
38
|
-
throw new AssertionError(msg);
|
39
|
-
}
|
40
|
-
let msgCheck;
|
41
|
-
if (typeof msgMatches === "string") {
|
42
|
-
msgCheck = stripAnsiCode(error.message).includes(stripAnsiCode(msgMatches));
|
43
|
-
}
|
44
|
-
if (msgMatches instanceof RegExp) {
|
45
|
-
msgCheck = msgMatches.test(stripAnsiCode(error.message));
|
46
|
-
}
|
47
|
-
if (msgMatches && !msgCheck) {
|
48
|
-
msg = `Expected error message to include ${msgMatches instanceof RegExp
|
49
|
-
? msgMatches.toString()
|
50
|
-
: JSON.stringify(msgMatches)}, but got ${JSON.stringify(error?.message)}${msgSuffix}`;
|
51
|
-
throw new AssertionError(msg);
|
52
|
-
}
|
53
|
-
}
|
54
|
-
//# sourceMappingURL=is_error.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"is_error.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/is_error.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,aAAa,CAC3B,KAAc;AACd,mCAAmC;AACnC,UAA+C,EAC/C,UAA4B,EAC5B,GAAY;IAEZ,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IACzC,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,cAAc,CACtB,yCAAyC,SAAS,EAAE,CACrD,CAAC;IACJ,CAAC;IACD,IAAI,UAAU,IAAI,CAAC,CAAC,KAAK,YAAY,UAAU,CAAC,EAAE,CAAC;QACjD,GAAG;YACD,qCAAqC,UAAU,CAAC,IAAI,eAAe,KAAK,EAAE,WAAW,EAAE,IAAI,IAAI,SAAS,EAAE,CAAC;QAC7G,MAAM,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IACD,IAAI,QAAQ,CAAC;IACb,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACnC,QAAQ,GAAG,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,QAAQ,CAC9C,aAAa,CAAC,UAAU,CAAC,CAC1B,CAAC;IACJ,CAAC;IACD,IAAI,UAAU,YAAY,MAAM,EAAE,CAAC;QACjC,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,IAAI,UAAU,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC5B,GAAG,GAAG,qCACJ,UAAU,YAAY,MAAM;YAC1B,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE;YACvB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAC/B,aAAa,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,SAAS,EAAE,CAAC;QAC1D,MAAM,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;AACH,CAAC"}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
-
// This module is browser compatible.
|
3
|
-
import { format } from "../../internal/1.0.5/format.js";
|
4
|
-
import { AssertionError } from "./assertion_error.js";
|
5
|
-
/**
|
6
|
-
* Make an assertion that `actual` is less than `expected`.
|
7
|
-
* If not then throw.
|
8
|
-
*
|
9
|
-
* @example Usage
|
10
|
-
* ```ts ignore
|
11
|
-
* import { assertLess } from "@std/assert";
|
12
|
-
*
|
13
|
-
* assertLess(1, 2); // Doesn't throw
|
14
|
-
* assertLess(2, 1); // Throws
|
15
|
-
* ```
|
16
|
-
*
|
17
|
-
* @typeParam T The type of the values to compare.
|
18
|
-
* @param actual The actual value to compare.
|
19
|
-
* @param expected The expected value to compare.
|
20
|
-
* @param msg The optional message to display if the assertion fails.
|
21
|
-
*/
|
22
|
-
export function assertLess(actual, expected, msg) {
|
23
|
-
if (actual < expected)
|
24
|
-
return;
|
25
|
-
const actualString = format(actual);
|
26
|
-
const expectedString = format(expected);
|
27
|
-
throw new AssertionError(msg ?? `Expect ${actualString} < ${expectedString}`);
|
28
|
-
}
|
29
|
-
//# sourceMappingURL=less.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"less.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/less.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,UAAU,CAAI,MAAS,EAAE,QAAW,EAAE,GAAY;IAChE,IAAI,MAAM,GAAG,QAAQ;QAAE,OAAO;IAE9B,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IACxC,MAAM,IAAI,cAAc,CAAC,GAAG,IAAI,UAAU,YAAY,MAAM,cAAc,EAAE,CAAC,CAAC;AAChF,CAAC"}
|
@@ -1,30 +0,0 @@
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
-
// This module is browser compatible.
|
3
|
-
import { format } from "../../internal/1.0.5/format.js";
|
4
|
-
import { AssertionError } from "./assertion_error.js";
|
5
|
-
/**
|
6
|
-
* Make an assertion that `actual` is less than or equal to `expected`.
|
7
|
-
* If not then throw.
|
8
|
-
*
|
9
|
-
* @example Usage
|
10
|
-
* ```ts ignore
|
11
|
-
* import { assertLessOrEqual } from "@std/assert";
|
12
|
-
*
|
13
|
-
* assertLessOrEqual(1, 2); // Doesn't throw
|
14
|
-
* assertLessOrEqual(1, 1); // Doesn't throw
|
15
|
-
* assertLessOrEqual(1, 0); // Throws
|
16
|
-
* ```
|
17
|
-
*
|
18
|
-
* @typeParam T The type of the values to compare.
|
19
|
-
* @param actual The actual value to compare.
|
20
|
-
* @param expected The expected value to compare.
|
21
|
-
* @param msg The optional message to display if the assertion fails.
|
22
|
-
*/
|
23
|
-
export function assertLessOrEqual(actual, expected, msg) {
|
24
|
-
if (actual <= expected)
|
25
|
-
return;
|
26
|
-
const actualString = format(actual);
|
27
|
-
const expectedString = format(expected);
|
28
|
-
throw new AssertionError(msg ?? `Expect ${actualString} <= ${expectedString}`);
|
29
|
-
}
|
30
|
-
//# sourceMappingURL=less_or_equal.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"less_or_equal.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/less_or_equal.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAAS,EACT,QAAW,EACX,GAAY;IAEZ,IAAI,MAAM,IAAI,QAAQ;QAAE,OAAO;IAE/B,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IACxC,MAAM,IAAI,cAAc,CACtB,GAAG,IAAI,UAAU,YAAY,OAAO,cAAc,EAAE,CACrD,CAAC;AACJ,CAAC"}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
-
// This module is browser compatible.
|
3
|
-
import { AssertionError } from "./assertion_error.js";
|
4
|
-
/**
|
5
|
-
* Make an assertion that `actual` match RegExp `expected`. If not
|
6
|
-
* then throw.
|
7
|
-
*
|
8
|
-
* @example Usage
|
9
|
-
* ```ts ignore
|
10
|
-
* import { assertMatch } from "@std/assert";
|
11
|
-
*
|
12
|
-
* assertMatch("Raptor", /Raptor/); // Doesn't throw
|
13
|
-
* assertMatch("Denosaurus", /Raptor/); // Throws
|
14
|
-
* ```
|
15
|
-
*
|
16
|
-
* @param actual The actual value to be matched.
|
17
|
-
* @param expected The expected pattern to match.
|
18
|
-
* @param msg The optional message to display if the assertion fails.
|
19
|
-
*/
|
20
|
-
export function assertMatch(actual, expected, msg) {
|
21
|
-
if (expected.test(actual))
|
22
|
-
return;
|
23
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
24
|
-
msg = `Expected actual: "${actual}" to match: "${expected}"${msgSuffix}`;
|
25
|
-
throw new AssertionError(msg);
|
26
|
-
}
|
27
|
-
//# sourceMappingURL=match.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"match.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/match.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,WAAW,CACzB,MAAc,EACd,QAAgB,EAChB,GAAY;IAEZ,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;QAAE,OAAO;IAClC,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IACzC,GAAG,GAAG,qBAAqB,MAAM,gBAAgB,QAAQ,IAAI,SAAS,EAAE,CAAC;IACzE,MAAM,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC"}
|