hein 2.0.0-alpha.1 → 2.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/rolldown_runtime.cjs +34 -0
- package/dist/assert/deep-equal.cjs +40 -0
- package/dist/assert/deep-equal.cjs.map +1 -0
- package/dist/assert/deep-equal.d.cts +5 -0
- package/dist/assert/deep-equal.d.cts.map +1 -0
- package/dist/assert/deep-equal.d.ts +5 -0
- package/dist/assert/deep-equal.d.ts.map +1 -0
- package/dist/assert/deep-equal.js +36 -0
- package/dist/assert/deep-equal.js.map +1 -0
- package/dist/assert/deep-has-property.cjs +68 -0
- package/dist/assert/deep-has-property.cjs.map +1 -0
- package/dist/assert/deep-has-property.d.cts +22 -0
- package/dist/assert/deep-has-property.d.cts.map +1 -0
- package/dist/assert/deep-has-property.d.ts +22 -0
- package/dist/assert/deep-has-property.d.ts.map +1 -0
- package/dist/assert/deep-has-property.js +63 -0
- package/dist/assert/deep-has-property.js.map +1 -0
- package/dist/assert/ends-with.cjs +30 -0
- package/dist/assert/ends-with.cjs.map +1 -0
- package/dist/assert/ends-with.d.cts +13 -0
- package/dist/assert/ends-with.d.cts.map +1 -0
- package/dist/assert/ends-with.d.ts +13 -0
- package/dist/assert/ends-with.d.ts.map +1 -0
- package/dist/assert/ends-with.js +27 -0
- package/dist/assert/ends-with.js.map +1 -0
- package/dist/assert/equal.cjs +37 -0
- package/dist/assert/equal.cjs.map +1 -0
- package/dist/assert/equal.d.cts +11 -0
- package/dist/assert/equal.d.cts.map +1 -0
- package/dist/assert/equal.d.ts +11 -0
- package/dist/assert/equal.d.ts.map +1 -0
- package/dist/assert/equal.js +34 -0
- package/dist/assert/equal.js.map +1 -0
- package/dist/assert/greater-than-equal.cjs +32 -0
- package/dist/assert/greater-than-equal.cjs.map +1 -0
- package/dist/assert/greater-than-equal.d.cts +11 -0
- package/dist/assert/greater-than-equal.d.cts.map +1 -0
- package/dist/assert/greater-than-equal.d.ts +11 -0
- package/dist/assert/greater-than-equal.d.ts.map +1 -0
- package/dist/assert/greater-than-equal.js +29 -0
- package/dist/assert/greater-than-equal.js.map +1 -0
- package/dist/assert/greater-than.cjs +33 -0
- package/dist/assert/greater-than.cjs.map +1 -0
- package/dist/assert/greater-than.d.cts +11 -0
- package/dist/assert/greater-than.d.cts.map +1 -0
- package/dist/assert/greater-than.d.ts +11 -0
- package/dist/assert/greater-than.d.ts.map +1 -0
- package/dist/assert/greater-than.js +30 -0
- package/dist/assert/greater-than.js.map +1 -0
- package/dist/assert/has-keys.cjs +58 -0
- package/dist/assert/has-keys.cjs.map +1 -0
- package/dist/assert/has-keys.d.cts +16 -0
- package/dist/assert/has-keys.d.cts.map +1 -0
- package/dist/assert/has-keys.d.ts +16 -0
- package/dist/assert/has-keys.d.ts.map +1 -0
- package/dist/assert/has-keys.js +54 -0
- package/dist/assert/has-keys.js.map +1 -0
- package/dist/assert/has-members.cjs +67 -0
- package/dist/assert/has-members.cjs.map +1 -0
- package/dist/assert/has-members.d.cts +48 -0
- package/dist/assert/has-members.d.cts.map +1 -0
- package/dist/assert/has-members.d.ts +48 -0
- package/dist/assert/has-members.d.ts.map +1 -0
- package/dist/assert/has-members.js +64 -0
- package/dist/assert/has-members.js.map +1 -0
- package/dist/assert/has-property.cjs +61 -0
- package/dist/assert/has-property.cjs.map +1 -0
- package/dist/assert/has-property.d.cts +22 -0
- package/dist/assert/has-property.d.cts.map +1 -0
- package/dist/assert/has-property.d.ts +22 -0
- package/dist/assert/has-property.d.ts.map +1 -0
- package/dist/assert/has-property.js +58 -0
- package/dist/assert/has-property.js.map +1 -0
- package/dist/assert/has-size.cjs +122 -0
- package/dist/assert/has-size.cjs.map +1 -0
- package/dist/assert/has-size.d.cts +42 -0
- package/dist/assert/has-size.d.cts.map +1 -0
- package/dist/assert/has-size.d.ts +42 -0
- package/dist/assert/has-size.d.ts.map +1 -0
- package/dist/assert/has-size.js +118 -0
- package/dist/assert/has-size.js.map +1 -0
- package/dist/assert/in-ballpark.cjs +44 -0
- package/dist/assert/in-ballpark.cjs.map +1 -0
- package/dist/assert/in-ballpark.d.cts +16 -0
- package/dist/assert/in-ballpark.d.cts.map +1 -0
- package/dist/assert/in-ballpark.d.ts +16 -0
- package/dist/assert/in-ballpark.d.ts.map +1 -0
- package/dist/assert/in-ballpark.js +41 -0
- package/dist/assert/in-ballpark.js.map +1 -0
- package/dist/assert/includes.cjs +30 -0
- package/dist/assert/includes.cjs.map +1 -0
- package/dist/assert/includes.d.cts +24 -0
- package/dist/assert/includes.d.cts.map +1 -0
- package/dist/assert/includes.d.ts +24 -0
- package/dist/assert/includes.d.ts.map +1 -0
- package/dist/assert/includes.js +27 -0
- package/dist/assert/includes.js.map +1 -0
- package/dist/assert/instance-of.cjs +36 -0
- package/dist/assert/instance-of.cjs.map +1 -0
- package/dist/assert/instance-of.d.cts +16 -0
- package/dist/assert/instance-of.d.cts.map +1 -0
- package/dist/assert/instance-of.d.ts +16 -0
- package/dist/assert/instance-of.d.ts.map +1 -0
- package/dist/assert/instance-of.js +32 -0
- package/dist/assert/instance-of.js.map +1 -0
- package/dist/assert/is-after.cjs +29 -0
- package/dist/assert/is-after.cjs.map +1 -0
- package/dist/assert/is-after.d.cts +11 -0
- package/dist/assert/is-after.d.cts.map +1 -0
- package/dist/assert/is-after.d.ts +11 -0
- package/dist/assert/is-after.d.ts.map +1 -0
- package/dist/assert/is-after.js +26 -0
- package/dist/assert/is-after.js.map +1 -0
- package/dist/assert/is-before.cjs +29 -0
- package/dist/assert/is-before.cjs.map +1 -0
- package/dist/assert/is-before.d.cts +11 -0
- package/dist/assert/is-before.d.cts.map +1 -0
- package/dist/assert/is-before.d.ts +11 -0
- package/dist/assert/is-before.d.ts.map +1 -0
- package/dist/assert/is-before.js +26 -0
- package/dist/assert/is-before.js.map +1 -0
- package/dist/assert/is-between.cjs +47 -0
- package/dist/assert/is-between.cjs.map +1 -0
- package/dist/assert/is-between.d.cts +15 -0
- package/dist/assert/is-between.d.cts.map +1 -0
- package/dist/assert/is-between.d.ts +15 -0
- package/dist/assert/is-between.d.ts.map +1 -0
- package/dist/assert/is-between.js +44 -0
- package/dist/assert/is-between.js.map +1 -0
- package/dist/assert/is-empty.cjs +98 -0
- package/dist/assert/is-empty.cjs.map +1 -0
- package/dist/assert/is-empty.d.cts +31 -0
- package/dist/assert/is-empty.d.cts.map +1 -0
- package/dist/assert/is-empty.d.ts +31 -0
- package/dist/assert/is-empty.d.ts.map +1 -0
- package/dist/assert/is-empty.js +94 -0
- package/dist/assert/is-empty.js.map +1 -0
- package/dist/assert/is-type.cjs +34 -0
- package/dist/assert/is-type.cjs.map +1 -0
- package/dist/assert/is-type.d.cts +97 -0
- package/dist/assert/is-type.d.cts.map +1 -0
- package/dist/assert/is-type.d.ts +97 -0
- package/dist/assert/is-type.d.ts.map +1 -0
- package/dist/assert/is-type.js +31 -0
- package/dist/assert/is-type.js.map +1 -0
- package/dist/assert/less-than-equal.cjs +36 -0
- package/dist/assert/less-than-equal.cjs.map +1 -0
- package/dist/assert/less-than-equal.d.cts +11 -0
- package/dist/assert/less-than-equal.d.cts.map +1 -0
- package/dist/assert/less-than-equal.d.ts +11 -0
- package/dist/assert/less-than-equal.d.ts.map +1 -0
- package/dist/assert/less-than-equal.js +33 -0
- package/dist/assert/less-than-equal.js.map +1 -0
- package/dist/assert/less-than.cjs +34 -0
- package/dist/assert/less-than.cjs.map +1 -0
- package/dist/assert/less-than.d.cts +11 -0
- package/dist/assert/less-than.d.cts.map +1 -0
- package/dist/assert/less-than.d.ts +11 -0
- package/dist/assert/less-than.d.ts.map +1 -0
- package/dist/assert/less-than.js +31 -0
- package/dist/assert/less-than.js.map +1 -0
- package/dist/assert/match.cjs +31 -0
- package/dist/assert/match.cjs.map +1 -0
- package/dist/assert/match.d.cts +15 -0
- package/dist/assert/match.d.cts.map +1 -0
- package/dist/assert/match.d.ts +15 -0
- package/dist/assert/match.d.ts.map +1 -0
- package/dist/assert/match.js +28 -0
- package/dist/assert/match.js.map +1 -0
- package/dist/assert/rejects.cjs +49 -0
- package/dist/assert/rejects.cjs.map +1 -0
- package/dist/assert/rejects.d.cts +36 -0
- package/dist/assert/rejects.d.cts.map +1 -0
- package/dist/assert/rejects.d.ts +36 -0
- package/dist/assert/rejects.d.ts.map +1 -0
- package/dist/assert/rejects.js +46 -0
- package/dist/assert/rejects.js.map +1 -0
- package/dist/assert/round-to.cjs +54 -0
- package/dist/assert/round-to.cjs.map +1 -0
- package/dist/assert/round-to.d.cts +15 -0
- package/dist/assert/round-to.d.cts.map +1 -0
- package/dist/assert/round-to.d.ts +15 -0
- package/dist/assert/round-to.d.ts.map +1 -0
- package/dist/assert/round-to.js +51 -0
- package/dist/assert/round-to.js.map +1 -0
- package/dist/assert/starts-with.cjs +30 -0
- package/dist/assert/starts-with.cjs.map +1 -0
- package/dist/assert/starts-with.d.cts +14 -0
- package/dist/assert/starts-with.d.cts.map +1 -0
- package/dist/assert/starts-with.d.ts +14 -0
- package/dist/assert/starts-with.d.ts.map +1 -0
- package/dist/assert/starts-with.js +27 -0
- package/dist/assert/starts-with.js.map +1 -0
- package/dist/assert/throws.cjs +41 -0
- package/dist/assert/throws.cjs.map +1 -0
- package/dist/{throws-CYLYG7gu.d.cts → assert/throws.d.cts} +4 -11
- package/dist/assert/throws.d.cts.map +1 -0
- package/dist/{throws-BlzO4xvg.d.ts → assert/throws.d.ts} +3 -12
- package/dist/assert/throws.d.ts.map +1 -0
- package/dist/assert/throws.js +38 -0
- package/dist/assert/throws.js.map +1 -0
- package/dist/assert.cjs +143 -52
- package/dist/assert.cjs.map +1 -0
- package/dist/assert.d.cts +34 -3
- package/dist/assert.d.cts.map +1 -0
- package/dist/assert.d.ts +34 -3
- package/dist/assert.d.ts.map +1 -0
- package/dist/assert.js +87 -2
- package/dist/assert.js.map +1 -0
- package/dist/expect/after.cjs +15 -0
- package/dist/expect/after.cjs.map +1 -0
- package/dist/expect/after.js +16 -0
- package/dist/expect/after.js.map +1 -0
- package/dist/expect/ballpark.cjs +15 -0
- package/dist/expect/ballpark.cjs.map +1 -0
- package/dist/expect/ballpark.js +16 -0
- package/dist/expect/ballpark.js.map +1 -0
- package/dist/expect/before.cjs +15 -0
- package/dist/expect/before.cjs.map +1 -0
- package/dist/expect/before.js +16 -0
- package/dist/expect/before.js.map +1 -0
- package/dist/expect/between.cjs +15 -0
- package/dist/expect/between.cjs.map +1 -0
- package/dist/expect/between.js +16 -0
- package/dist/expect/between.js.map +1 -0
- package/dist/expect/empty.cjs +15 -0
- package/dist/expect/empty.cjs.map +1 -0
- package/dist/expect/empty.js +16 -0
- package/dist/expect/empty.js.map +1 -0
- package/dist/expect/end-with.cjs +15 -0
- package/dist/expect/end-with.cjs.map +1 -0
- package/dist/expect/end-with.js +16 -0
- package/dist/expect/end-with.js.map +1 -0
- package/dist/expect/eql.cjs +21 -0
- package/dist/expect/eql.cjs.map +1 -0
- package/dist/expect/eql.js +22 -0
- package/dist/expect/eql.js.map +1 -0
- package/dist/expect/equal-shorthand.cjs +34 -0
- package/dist/expect/equal-shorthand.cjs.map +1 -0
- package/dist/expect/equal-shorthand.js +33 -0
- package/dist/expect/equal-shorthand.js.map +1 -0
- package/dist/expect/equal.cjs +27 -0
- package/dist/expect/equal.cjs.map +1 -0
- package/dist/expect/equal.js +28 -0
- package/dist/expect/equal.js.map +1 -0
- package/dist/expect/excluding.cjs +19 -0
- package/dist/expect/excluding.cjs.map +1 -0
- package/dist/expect/excluding.js +18 -0
- package/dist/expect/excluding.js.map +1 -0
- package/dist/expect/greater-than-equal.cjs +25 -0
- package/dist/expect/greater-than-equal.cjs.map +1 -0
- package/dist/expect/greater-than-equal.js +26 -0
- package/dist/expect/greater-than-equal.js.map +1 -0
- package/dist/expect/greater-than.cjs +25 -0
- package/dist/expect/greater-than.cjs.map +1 -0
- package/dist/expect/greater-than.js +26 -0
- package/dist/expect/greater-than.js.map +1 -0
- package/dist/expect/has-property.cjs +20 -0
- package/dist/expect/has-property.cjs.map +1 -0
- package/dist/expect/has-property.js +21 -0
- package/dist/expect/has-property.js.map +1 -0
- package/dist/expect/include.cjs +21 -0
- package/dist/expect/include.cjs.map +1 -0
- package/dist/expect/include.js +22 -0
- package/dist/expect/include.js.map +1 -0
- package/dist/expect/instance-of-shorthand.cjs +24 -0
- package/dist/expect/instance-of-shorthand.cjs.map +1 -0
- package/dist/expect/instance-of-shorthand.js +25 -0
- package/dist/expect/instance-of-shorthand.js.map +1 -0
- package/dist/expect/instance-of.cjs +15 -0
- package/dist/expect/instance-of.cjs.map +1 -0
- package/dist/expect/instance-of.js +16 -0
- package/dist/expect/instance-of.js.map +1 -0
- package/dist/expect/keys.cjs +15 -0
- package/dist/expect/keys.cjs.map +1 -0
- package/dist/expect/keys.js +16 -0
- package/dist/expect/keys.js.map +1 -0
- package/dist/expect/length.cjs +21 -0
- package/dist/expect/length.cjs.map +1 -0
- package/dist/expect/length.js +22 -0
- package/dist/expect/length.js.map +1 -0
- package/dist/expect/less-than-equal.cjs +25 -0
- package/dist/expect/less-than-equal.cjs.map +1 -0
- package/dist/expect/less-than-equal.js +26 -0
- package/dist/expect/less-than-equal.js.map +1 -0
- package/dist/expect/less-than.cjs +25 -0
- package/dist/expect/less-than.cjs.map +1 -0
- package/dist/expect/less-than.js +26 -0
- package/dist/expect/less-than.js.map +1 -0
- package/dist/expect/match.cjs +15 -0
- package/dist/expect/match.cjs.map +1 -0
- package/dist/expect/match.js +16 -0
- package/dist/expect/match.js.map +1 -0
- package/dist/expect/members.cjs +41 -0
- package/dist/expect/members.cjs.map +1 -0
- package/dist/expect/members.js +42 -0
- package/dist/expect/members.js.map +1 -0
- package/dist/expect/reject.cjs +14 -0
- package/dist/expect/reject.cjs.map +1 -0
- package/dist/expect/reject.js +15 -0
- package/dist/expect/reject.js.map +1 -0
- package/dist/expect/round-to.cjs +15 -0
- package/dist/expect/round-to.cjs.map +1 -0
- package/dist/expect/round-to.js +16 -0
- package/dist/expect/round-to.js.map +1 -0
- package/dist/expect/start-with.cjs +15 -0
- package/dist/expect/start-with.cjs.map +1 -0
- package/dist/expect/start-with.js +16 -0
- package/dist/expect/start-with.js.map +1 -0
- package/dist/expect/throw.cjs +14 -0
- package/dist/expect/throw.cjs.map +1 -0
- package/dist/expect/throw.js +15 -0
- package/dist/expect/throw.js.map +1 -0
- package/dist/expect/type-shorthand.cjs +29 -0
- package/dist/expect/type-shorthand.cjs.map +1 -0
- package/dist/expect/type-shorthand.js +30 -0
- package/dist/expect/type-shorthand.js.map +1 -0
- package/dist/expect/type.cjs +15 -0
- package/dist/expect/type.cjs.map +1 -0
- package/dist/expect/type.js +16 -0
- package/dist/expect/type.js.map +1 -0
- package/dist/expect.cjs +144 -0
- package/dist/expect.cjs.map +1 -0
- package/dist/expect.d.cts +10 -0
- package/dist/expect.d.cts.map +1 -0
- package/dist/expect.d.ts +10 -0
- package/dist/expect.d.ts.map +1 -0
- package/dist/expect.js +141 -0
- package/dist/expect.js.map +1 -0
- package/dist/expect.types.d.cts +67 -3
- package/dist/expect.types.d.cts.map +1 -0
- package/dist/expect.types.d.ts +67 -3
- package/dist/expect.types.d.ts.map +1 -0
- package/dist/index.cjs +13 -582
- package/dist/index.d.cts +8 -15
- package/dist/index.d.ts +8 -15
- package/dist/index.js +8 -575
- package/dist/mixins.cjs +11 -0
- package/dist/mixins.cjs.map +1 -0
- package/dist/mixins.d.cts +28 -0
- package/dist/mixins.d.cts.map +1 -0
- package/dist/mixins.d.ts +28 -0
- package/dist/mixins.d.ts.map +1 -0
- package/dist/mixins.js +9 -0
- package/dist/mixins.js.map +1 -0
- package/dist/utils/chain.cjs +20 -0
- package/dist/utils/chain.cjs.map +1 -0
- package/dist/utils/chain.js +18 -0
- package/dist/utils/chain.js.map +1 -0
- package/dist/utils/fail.cjs +16 -0
- package/dist/utils/fail.cjs.map +1 -0
- package/dist/utils/fail.d.cts +9 -0
- package/dist/utils/fail.d.cts.map +1 -0
- package/dist/utils/fail.d.ts +9 -0
- package/dist/utils/fail.d.ts.map +1 -0
- package/dist/utils/fail.js +14 -0
- package/dist/utils/fail.js.map +1 -0
- package/dist/utils/get-size.cjs +17 -0
- package/dist/utils/get-size.cjs.map +1 -0
- package/dist/utils/get-size.js +15 -0
- package/dist/utils/get-size.js.map +1 -0
- package/dist/utils/get-type.cjs +12 -0
- package/dist/utils/get-type.cjs.map +1 -0
- package/dist/utils/get-type.d.cts +5 -0
- package/dist/utils/get-type.d.cts.map +1 -0
- package/dist/utils/get-type.d.ts +5 -0
- package/dist/utils/get-type.d.ts.map +1 -0
- package/dist/utils/get-type.js +11 -0
- package/dist/utils/get-type.js.map +1 -0
- package/dist/utils/match.cjs +118 -0
- package/dist/utils/match.cjs.map +1 -0
- package/dist/utils/match.d.cts +7 -0
- package/dist/utils/match.d.cts.map +1 -0
- package/dist/utils/match.d.ts +7 -0
- package/dist/utils/match.d.ts.map +1 -0
- package/dist/utils/match.js +114 -0
- package/dist/utils/match.js.map +1 -0
- package/dist/utils/process-error.cjs +86 -0
- package/dist/utils/process-error.cjs.map +1 -0
- package/dist/utils/process-error.d.cts +8 -0
- package/dist/utils/process-error.d.cts.map +1 -0
- package/dist/utils/process-error.d.ts +10 -0
- package/dist/utils/process-error.d.ts.map +1 -0
- package/dist/utils/process-error.js +85 -0
- package/dist/utils/process-error.js.map +1 -0
- package/dist/utils/validate-numeric-and-dates.cjs +20 -0
- package/dist/utils/validate-numeric-and-dates.cjs.map +1 -0
- package/dist/utils/validate-numeric-and-dates.js +18 -0
- package/dist/utils/validate-numeric-and-dates.js.map +1 -0
- package/dist/utils/xor.cjs +9 -0
- package/dist/utils/xor.cjs.map +1 -0
- package/dist/utils/xor.js +8 -0
- package/dist/utils/xor.js.map +1 -0
- package/package.json +1 -1
- package/dist/assert-ChQPKP5C.d.cts +0 -480
- package/dist/assert-ChQPKP5C.d.cts.map +0 -1
- package/dist/assert-CsN7srt-.d.ts +0 -478
- package/dist/assert-CsN7srt-.d.ts.map +0 -1
- package/dist/assert-DZjgWjOw.cjs +0 -1626
- package/dist/assert-DZjgWjOw.cjs.map +0 -1
- package/dist/assert-kFXp7i_B.js +0 -1260
- package/dist/assert-kFXp7i_B.js.map +0 -1
- package/dist/expect.types-CHYPdbCW.d.cts +0 -454
- package/dist/expect.types-CHYPdbCW.d.cts.map +0 -1
- package/dist/expect.types-nBq4Rg8e.d.ts +0 -454
- package/dist/expect.types-nBq4Rg8e.d.ts.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/throws-BlzO4xvg.d.ts.map +0 -1
- package/dist/throws-CYLYG7gu.d.cts.map +0 -1
- /package/dist/{chunk-CTAAG5j7.js → _virtual/rolldown_runtime.js} +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const require_greater_than_equal = require('../assert/greater-than-equal.cjs');
|
|
2
|
+
require('../assert.cjs');
|
|
3
|
+
const require_mixins = require('../mixins.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/expect/greater-than-equal.ts
|
|
6
|
+
require_mixins.use({
|
|
7
|
+
greaterThanOrEqual: {
|
|
8
|
+
type: "method",
|
|
9
|
+
value: ({ value, inverted }) => (other) => {
|
|
10
|
+
if (inverted) require_greater_than_equal.notGreaterThanEqual(value, other);
|
|
11
|
+
else require_greater_than_equal.greaterThanEqual(value, other);
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
gte: {
|
|
15
|
+
type: "alias",
|
|
16
|
+
value: "greaterThanOrEqual"
|
|
17
|
+
},
|
|
18
|
+
atLeast: {
|
|
19
|
+
type: "alias",
|
|
20
|
+
value: "greaterThanOrEqual"
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
//# sourceMappingURL=greater-than-equal.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"greater-than-equal.cjs","names":["use"],"sources":["../../src/expect/greater-than-equal.ts"],"sourcesContent":["import { greaterThanEqual, notGreaterThanEqual } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface NumberExpect<T> {\n /**\n * check if actual is greater than or equal to expected\n */\n greaterThanOrEqual(value: T): this;\n /**\n * check if actual is greater than or equal to expected\n */\n gte(value: T): this;\n /**\n * check if actual is greater than or equal to expected\n */\n atLeast(value: T): this;\n }\n interface DateExpect<T> {\n /**\n * check if actual is greater than or equal to expected\n */\n greaterThanOrEqual(value: T): this;\n /**\n * check if actual is greater than or equal to expected\n */\n gte(value: T): this;\n /**\n * check if actual is greater than or equal to expected\n */\n atLeast(value: T): this;\n }\n}\n\nuse({\n greaterThanOrEqual: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (other: any) => {\n if (inverted) {\n notGreaterThanEqual(value, other);\n } else {\n greaterThanEqual(value, other);\n }\n }\n },\n gte: { type: 'alias', value: 'greaterThanOrEqual' },\n atLeast: { type: 'alias', value: 'greaterThanOrEqual' }\n});\n"],"mappings":";;;;;AAkCAA,mBAAI;CACA,oBAAoB;EAChB,MAAM;EACN,QACK,EAAE,OAAO,gBACT,UAAe;AACZ,OAAI,SACA,gDAAoB,OAAO,MAAM;OAEjC,6CAAiB,OAAO,MAAM;;EAG7C;CACD,KAAK;EAAE,MAAM;EAAS,OAAO;EAAsB;CACnD,SAAS;EAAE,MAAM;EAAS,OAAO;EAAsB;CAC1D,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { greaterThanEqual, notGreaterThanEqual } from "../assert/greater-than-equal.js";
|
|
2
|
+
import "../assert.js";
|
|
3
|
+
import { use } from "../mixins.js";
|
|
4
|
+
|
|
5
|
+
//#region src/expect/greater-than-equal.ts
|
|
6
|
+
use({
|
|
7
|
+
greaterThanOrEqual: {
|
|
8
|
+
type: "method",
|
|
9
|
+
value: ({ value, inverted }) => (other) => {
|
|
10
|
+
if (inverted) notGreaterThanEqual(value, other);
|
|
11
|
+
else greaterThanEqual(value, other);
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
gte: {
|
|
15
|
+
type: "alias",
|
|
16
|
+
value: "greaterThanOrEqual"
|
|
17
|
+
},
|
|
18
|
+
atLeast: {
|
|
19
|
+
type: "alias",
|
|
20
|
+
value: "greaterThanOrEqual"
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { };
|
|
26
|
+
//# sourceMappingURL=greater-than-equal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"greater-than-equal.js","names":[],"sources":["../../src/expect/greater-than-equal.ts"],"sourcesContent":["import { greaterThanEqual, notGreaterThanEqual } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface NumberExpect<T> {\n /**\n * check if actual is greater than or equal to expected\n */\n greaterThanOrEqual(value: T): this;\n /**\n * check if actual is greater than or equal to expected\n */\n gte(value: T): this;\n /**\n * check if actual is greater than or equal to expected\n */\n atLeast(value: T): this;\n }\n interface DateExpect<T> {\n /**\n * check if actual is greater than or equal to expected\n */\n greaterThanOrEqual(value: T): this;\n /**\n * check if actual is greater than or equal to expected\n */\n gte(value: T): this;\n /**\n * check if actual is greater than or equal to expected\n */\n atLeast(value: T): this;\n }\n}\n\nuse({\n greaterThanOrEqual: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (other: any) => {\n if (inverted) {\n notGreaterThanEqual(value, other);\n } else {\n greaterThanEqual(value, other);\n }\n }\n },\n gte: { type: 'alias', value: 'greaterThanOrEqual' },\n atLeast: { type: 'alias', value: 'greaterThanOrEqual' }\n});\n"],"mappings":";;;;;AAkCA,IAAI;CACA,oBAAoB;EAChB,MAAM;EACN,QACK,EAAE,OAAO,gBACT,UAAe;AACZ,OAAI,SACA,qBAAoB,OAAO,MAAM;OAEjC,kBAAiB,OAAO,MAAM;;EAG7C;CACD,KAAK;EAAE,MAAM;EAAS,OAAO;EAAsB;CACnD,SAAS;EAAE,MAAM;EAAS,OAAO;EAAsB;CAC1D,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const require_greater_than = require('../assert/greater-than.cjs');
|
|
2
|
+
require('../assert.cjs');
|
|
3
|
+
const require_mixins = require('../mixins.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/expect/greater-than.ts
|
|
6
|
+
require_mixins.use({
|
|
7
|
+
greaterThan: {
|
|
8
|
+
type: "method",
|
|
9
|
+
value: ({ value, inverted }) => (other) => {
|
|
10
|
+
if (inverted) require_greater_than.notGreaterThan(value, other);
|
|
11
|
+
else require_greater_than.greaterThan(value, other);
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
gt: {
|
|
15
|
+
type: "alias",
|
|
16
|
+
value: "greaterThan"
|
|
17
|
+
},
|
|
18
|
+
above: {
|
|
19
|
+
type: "alias",
|
|
20
|
+
value: "greaterThan"
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
//# sourceMappingURL=greater-than.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"greater-than.cjs","names":["use"],"sources":["../../src/expect/greater-than.ts"],"sourcesContent":["import { greaterThan, notGreaterThan } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface NumberExpect<T> {\n /**\n * check if actual is greater than expected\n */\n greaterThan(value: T): this;\n /**\n * check if actual is greater than expected\n */\n gt(value: T): this;\n /**\n * check if actual is greater than expected\n */\n above(value: T): this;\n }\n interface DateExpect<T> {\n /**\n * check if actual is greater than expected\n */\n greaterThan(value: T): this;\n /**\n * check if actual is greater than expected\n */\n gt(value: T): this;\n /**\n * check if actual is greater than expected\n */\n above(value: T): this;\n }\n}\n\nuse({\n greaterThan: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (other: any) => {\n if (inverted) {\n notGreaterThan(value, other);\n } else {\n greaterThan(value, other);\n }\n }\n },\n gt: { type: 'alias', value: 'greaterThan' },\n above: { type: 'alias', value: 'greaterThan' }\n});\n"],"mappings":";;;;;AAkCAA,mBAAI;CACA,aAAa;EACT,MAAM;EACN,QACK,EAAE,OAAO,gBACT,UAAe;AACZ,OAAI,SACA,qCAAe,OAAO,MAAM;OAE5B,kCAAY,OAAO,MAAM;;EAGxC;CACD,IAAI;EAAE,MAAM;EAAS,OAAO;EAAe;CAC3C,OAAO;EAAE,MAAM;EAAS,OAAO;EAAe;CACjD,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { greaterThan, notGreaterThan } from "../assert/greater-than.js";
|
|
2
|
+
import "../assert.js";
|
|
3
|
+
import { use } from "../mixins.js";
|
|
4
|
+
|
|
5
|
+
//#region src/expect/greater-than.ts
|
|
6
|
+
use({
|
|
7
|
+
greaterThan: {
|
|
8
|
+
type: "method",
|
|
9
|
+
value: ({ value, inverted }) => (other) => {
|
|
10
|
+
if (inverted) notGreaterThan(value, other);
|
|
11
|
+
else greaterThan(value, other);
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
gt: {
|
|
15
|
+
type: "alias",
|
|
16
|
+
value: "greaterThan"
|
|
17
|
+
},
|
|
18
|
+
above: {
|
|
19
|
+
type: "alias",
|
|
20
|
+
value: "greaterThan"
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { };
|
|
26
|
+
//# sourceMappingURL=greater-than.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"greater-than.js","names":[],"sources":["../../src/expect/greater-than.ts"],"sourcesContent":["import { greaterThan, notGreaterThan } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface NumberExpect<T> {\n /**\n * check if actual is greater than expected\n */\n greaterThan(value: T): this;\n /**\n * check if actual is greater than expected\n */\n gt(value: T): this;\n /**\n * check if actual is greater than expected\n */\n above(value: T): this;\n }\n interface DateExpect<T> {\n /**\n * check if actual is greater than expected\n */\n greaterThan(value: T): this;\n /**\n * check if actual is greater than expected\n */\n gt(value: T): this;\n /**\n * check if actual is greater than expected\n */\n above(value: T): this;\n }\n}\n\nuse({\n greaterThan: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (other: any) => {\n if (inverted) {\n notGreaterThan(value, other);\n } else {\n greaterThan(value, other);\n }\n }\n },\n gt: { type: 'alias', value: 'greaterThan' },\n above: { type: 'alias', value: 'greaterThan' }\n});\n"],"mappings":";;;;;AAkCA,IAAI;CACA,aAAa;EACT,MAAM;EACN,QACK,EAAE,OAAO,gBACT,UAAe;AACZ,OAAI,SACA,gBAAe,OAAO,MAAM;OAE5B,aAAY,OAAO,MAAM;;EAGxC;CACD,IAAI;EAAE,MAAM;EAAS,OAAO;EAAe;CAC3C,OAAO;EAAE,MAAM;EAAS,OAAO;EAAe;CACjD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const require_has_property = require('../assert/has-property.cjs');
|
|
2
|
+
const require_deep_has_property = require('../assert/deep-has-property.cjs');
|
|
3
|
+
require('../assert.cjs');
|
|
4
|
+
const require_mixins = require('../mixins.cjs');
|
|
5
|
+
|
|
6
|
+
//#region src/expect/has-property.ts
|
|
7
|
+
require_mixins.use({ property: {
|
|
8
|
+
type: "method",
|
|
9
|
+
value: ({ value, inverted, deep }) => (...args) => {
|
|
10
|
+
if (deep) {
|
|
11
|
+
if (inverted) return require_deep_has_property.deepNotHasProperty(value, ...args);
|
|
12
|
+
return require_deep_has_property.deepHasProperty(value, ...args);
|
|
13
|
+
}
|
|
14
|
+
if (inverted) return require_has_property.notHasProperty(value, ...args);
|
|
15
|
+
return require_has_property.hasProperty(value, ...args);
|
|
16
|
+
}
|
|
17
|
+
} });
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
//# sourceMappingURL=has-property.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"has-property.cjs","names":["use","deepNotHasProperty","deepHasProperty","notHasProperty","hasProperty"],"sources":["../../src/expect/has-property.ts"],"sourcesContent":["import { deepHasProperty, deepNotHasProperty, hasProperty, notHasProperty } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface ValueExpect<T> {\n /**\n * check if value has a property\n * @param property a property in the object. When combined with .deep. can be a path like 'a.b.c'\n * @example expect({a: {b: {c: 1}}}).to.have.property('a.b.c');\n * @example expect({a: {b: {c: 1}}}).to.have.deep.property('[0].a.b.c');\n */\n property<K extends keyof T>(property: K): this;\n /**\n * check if value has a property\n * @param property a property in the object. When combined with .deep. can be a path like 'a.b.c'\n * @example expect({a: {b: {c: 1}}}).to.have.property('a.b.c');\n * @example expect({a: {b: {c: 1}}}).to.have.deep.property('[0].a.b.c');\n */\n property(property: string): this;\n /**\n * check if value has a property\n * @param property a property in the object. When combined with .deep. can be a path like 'a.b.c'\n * @param value\n * @example expect({a: {b: {c: 1}}}).to.have.property('a.b.c');\n * @example expect({a: {b: {c: 1}}}).to.have.deep.property('[0].a.b.c');\n */\n property<K extends keyof T>(property: K, value?: any): this;\n /**\n * check if value has a property\n * @param property a property in the object. When combined with .deep. can be a path like 'a.b.c'\n * @param value\n * @example expect({a: {b: {c: 1}}}).to.have.property('a.b.c');\n * @example expect({a: {b: {c: 1}}}).to.have.deep.property('[0].a.b.c');\n */\n property(property: string, value?: any): this;\n }\n}\n\nuse({\n property: {\n type: 'method',\n value:\n ({ value, inverted, deep }) =>\n (...args: [any, any]) => {\n if (deep) {\n if (inverted) {\n return deepNotHasProperty(value, ...args);\n }\n return deepHasProperty(value, ...args);\n }\n if (inverted) {\n return notHasProperty(value, ...args);\n }\n return hasProperty(value, ...args);\n }\n }\n});\n"],"mappings":";;;;;;AAsCAA,mBAAI,EACA,UAAU;CACN,MAAM;CACN,QACK,EAAE,OAAO,UAAU,YACnB,GAAG,SAAqB;AACrB,MAAI,MAAM;AACN,OAAI,SACA,QAAOC,6CAAmB,OAAO,GAAG,KAAK;AAE7C,UAAOC,0CAAgB,OAAO,GAAG,KAAK;;AAE1C,MAAI,SACA,QAAOC,oCAAe,OAAO,GAAG,KAAK;AAEzC,SAAOC,iCAAY,OAAO,GAAG,KAAK;;CAE7C,EACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { hasProperty, notHasProperty } from "../assert/has-property.js";
|
|
2
|
+
import { deepHasProperty, deepNotHasProperty } from "../assert/deep-has-property.js";
|
|
3
|
+
import "../assert.js";
|
|
4
|
+
import { use } from "../mixins.js";
|
|
5
|
+
|
|
6
|
+
//#region src/expect/has-property.ts
|
|
7
|
+
use({ property: {
|
|
8
|
+
type: "method",
|
|
9
|
+
value: ({ value, inverted, deep }) => (...args) => {
|
|
10
|
+
if (deep) {
|
|
11
|
+
if (inverted) return deepNotHasProperty(value, ...args);
|
|
12
|
+
return deepHasProperty(value, ...args);
|
|
13
|
+
}
|
|
14
|
+
if (inverted) return notHasProperty(value, ...args);
|
|
15
|
+
return hasProperty(value, ...args);
|
|
16
|
+
}
|
|
17
|
+
} });
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { };
|
|
21
|
+
//# sourceMappingURL=has-property.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"has-property.js","names":[],"sources":["../../src/expect/has-property.ts"],"sourcesContent":["import { deepHasProperty, deepNotHasProperty, hasProperty, notHasProperty } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface ValueExpect<T> {\n /**\n * check if value has a property\n * @param property a property in the object. When combined with .deep. can be a path like 'a.b.c'\n * @example expect({a: {b: {c: 1}}}).to.have.property('a.b.c');\n * @example expect({a: {b: {c: 1}}}).to.have.deep.property('[0].a.b.c');\n */\n property<K extends keyof T>(property: K): this;\n /**\n * check if value has a property\n * @param property a property in the object. When combined with .deep. can be a path like 'a.b.c'\n * @example expect({a: {b: {c: 1}}}).to.have.property('a.b.c');\n * @example expect({a: {b: {c: 1}}}).to.have.deep.property('[0].a.b.c');\n */\n property(property: string): this;\n /**\n * check if value has a property\n * @param property a property in the object. When combined with .deep. can be a path like 'a.b.c'\n * @param value\n * @example expect({a: {b: {c: 1}}}).to.have.property('a.b.c');\n * @example expect({a: {b: {c: 1}}}).to.have.deep.property('[0].a.b.c');\n */\n property<K extends keyof T>(property: K, value?: any): this;\n /**\n * check if value has a property\n * @param property a property in the object. When combined with .deep. can be a path like 'a.b.c'\n * @param value\n * @example expect({a: {b: {c: 1}}}).to.have.property('a.b.c');\n * @example expect({a: {b: {c: 1}}}).to.have.deep.property('[0].a.b.c');\n */\n property(property: string, value?: any): this;\n }\n}\n\nuse({\n property: {\n type: 'method',\n value:\n ({ value, inverted, deep }) =>\n (...args: [any, any]) => {\n if (deep) {\n if (inverted) {\n return deepNotHasProperty(value, ...args);\n }\n return deepHasProperty(value, ...args);\n }\n if (inverted) {\n return notHasProperty(value, ...args);\n }\n return hasProperty(value, ...args);\n }\n }\n});\n"],"mappings":";;;;;;AAsCA,IAAI,EACA,UAAU;CACN,MAAM;CACN,QACK,EAAE,OAAO,UAAU,YACnB,GAAG,SAAqB;AACrB,MAAI,MAAM;AACN,OAAI,SACA,QAAO,mBAAmB,OAAO,GAAG,KAAK;AAE7C,UAAO,gBAAgB,OAAO,GAAG,KAAK;;AAE1C,MAAI,SACA,QAAO,eAAe,OAAO,GAAG,KAAK;AAEzC,SAAO,YAAY,OAAO,GAAG,KAAK;;CAE7C,EACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const require_includes = require('../assert/includes.cjs');
|
|
2
|
+
require('../assert.cjs');
|
|
3
|
+
const require_mixins = require('../mixins.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/expect/include.ts
|
|
6
|
+
require_mixins.use({
|
|
7
|
+
include: {
|
|
8
|
+
type: "method",
|
|
9
|
+
value: ({ value, inverted }) => (...elements) => {
|
|
10
|
+
if (inverted) require_includes.notIncludes(value, ...elements);
|
|
11
|
+
else require_includes.includes(value, ...elements);
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
contain: {
|
|
15
|
+
type: "alias",
|
|
16
|
+
value: "include"
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
//# sourceMappingURL=include.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"include.cjs","names":["use"],"sources":["../../src/expect/include.ts"],"sourcesContent":["import { includes, notIncludes } from '../assert.js';\nimport { use } from '../mixins.js';\n\ntype ArrayType<T> = T extends (infer U)[] ? U : T;\n\ndeclare module '../expect.types' {\n interface ArrayExpect<T> {\n /**\n * check if array includes element(s)\n */\n include(...elements: ArrayType<T>[]): this;\n /**\n * check if array includes element(s)\n */\n contain(...elements: ArrayType<T>[]): this;\n }\n interface StringExpect {\n /**\n * check if string includes substring(s)\n */\n include(...substrings: string[]): this;\n /**\n * check if string includes substring(s)\n */\n contain(...substrings: string[]): this;\n }\n}\n\nuse({\n include: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (...elements: any[]) => {\n if (inverted) {\n notIncludes(value, ...elements);\n } else {\n includes(value, ...elements);\n }\n }\n },\n contain: {\n type: 'alias',\n value: 'include'\n }\n});\n"],"mappings":";;;;;AA4BAA,mBAAI;CACA,SAAS;EACL,MAAM;EACN,QACK,EAAE,OAAO,gBACT,GAAG,aAAoB;AACpB,OAAI,SACA,8BAAY,OAAO,GAAG,SAAS;OAE/B,2BAAS,OAAO,GAAG,SAAS;;EAG3C;CACD,SAAS;EACL,MAAM;EACN,OAAO;EACV;CACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { includes, notIncludes } from "../assert/includes.js";
|
|
2
|
+
import "../assert.js";
|
|
3
|
+
import { use } from "../mixins.js";
|
|
4
|
+
|
|
5
|
+
//#region src/expect/include.ts
|
|
6
|
+
use({
|
|
7
|
+
include: {
|
|
8
|
+
type: "method",
|
|
9
|
+
value: ({ value, inverted }) => (...elements) => {
|
|
10
|
+
if (inverted) notIncludes(value, ...elements);
|
|
11
|
+
else includes(value, ...elements);
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
contain: {
|
|
15
|
+
type: "alias",
|
|
16
|
+
value: "include"
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { };
|
|
22
|
+
//# sourceMappingURL=include.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"include.js","names":[],"sources":["../../src/expect/include.ts"],"sourcesContent":["import { includes, notIncludes } from '../assert.js';\nimport { use } from '../mixins.js';\n\ntype ArrayType<T> = T extends (infer U)[] ? U : T;\n\ndeclare module '../expect.types' {\n interface ArrayExpect<T> {\n /**\n * check if array includes element(s)\n */\n include(...elements: ArrayType<T>[]): this;\n /**\n * check if array includes element(s)\n */\n contain(...elements: ArrayType<T>[]): this;\n }\n interface StringExpect {\n /**\n * check if string includes substring(s)\n */\n include(...substrings: string[]): this;\n /**\n * check if string includes substring(s)\n */\n contain(...substrings: string[]): this;\n }\n}\n\nuse({\n include: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (...elements: any[]) => {\n if (inverted) {\n notIncludes(value, ...elements);\n } else {\n includes(value, ...elements);\n }\n }\n },\n contain: {\n type: 'alias',\n value: 'include'\n }\n});\n"],"mappings":";;;;;AA4BA,IAAI;CACA,SAAS;EACL,MAAM;EACN,QACK,EAAE,OAAO,gBACT,GAAG,aAAoB;AACpB,OAAI,SACA,aAAY,OAAO,GAAG,SAAS;OAE/B,UAAS,OAAO,GAAG,SAAS;;EAG3C;CACD,SAAS;EACL,MAAM;EACN,OAAO;EACV;CACJ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const require_instance_of = require('../assert/instance-of.cjs');
|
|
2
|
+
require('../assert.cjs');
|
|
3
|
+
const require_mixins = require('../mixins.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/expect/instance-of-shorthand.ts
|
|
6
|
+
const constructors = [
|
|
7
|
+
Date,
|
|
8
|
+
Map,
|
|
9
|
+
Set,
|
|
10
|
+
WeakMap,
|
|
11
|
+
WeakSet
|
|
12
|
+
];
|
|
13
|
+
require_mixins.use(Object.fromEntries(constructors.map((constructor) => {
|
|
14
|
+
return [constructor.name, {
|
|
15
|
+
type: "method",
|
|
16
|
+
value: ({ inverted, value }) => () => {
|
|
17
|
+
if (inverted) require_instance_of.notInstanceOf(value, constructor);
|
|
18
|
+
else require_instance_of.instanceOf(value, constructor);
|
|
19
|
+
}
|
|
20
|
+
}];
|
|
21
|
+
})));
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
//# sourceMappingURL=instance-of-shorthand.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-of-shorthand.cjs","names":["use"],"sources":["../../src/expect/instance-of-shorthand.ts"],"sourcesContent":["import { instanceOf, notInstanceOf } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface DateExpect {\n /**\n * check if value is an instance of Date\n */\n Date(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ObjectExpect<T> {\n /**\n * check if value is an instance of Map\n */\n Map(): this;\n /**\n * check if value is an instance of Set\n */\n Set(): this;\n /**\n * check if value is an instance of WeakMap\n */\n WeakMap(): this;\n /**\n * check if value is an instance of WeakSet\n */\n WeakSet(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface MapExpect<T> {\n /**\n * check if value is an instance of Map\n */\n Map(): this;\n }\n}\n\nconst constructors = [Date, Map, Set, WeakMap, WeakSet];\n\nuse(\n Object.fromEntries(\n constructors.map((constructor) => {\n return [\n constructor.name,\n {\n type: 'method',\n value:\n ({ inverted, value }) =>\n () => {\n if (inverted) {\n notInstanceOf(value, constructor);\n } else {\n instanceOf(value, constructor);\n }\n }\n }\n ];\n })\n )\n);\n"],"mappings":";;;;;AAsCA,MAAM,eAAe;CAAC;CAAM;CAAK;CAAK;CAAS;CAAQ;AAEvDA,mBACI,OAAO,YACH,aAAa,KAAK,gBAAgB;AAC9B,QAAO,CACH,YAAY,MACZ;EACI,MAAM;EACN,QACK,EAAE,UAAU,kBACP;AACF,OAAI,SACA,mCAAc,OAAO,YAAY;OAEjC,gCAAW,OAAO,YAAY;;EAG7C,CACJ;EACH,CACL,CACJ"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { instanceOf, notInstanceOf } from "../assert/instance-of.js";
|
|
2
|
+
import "../assert.js";
|
|
3
|
+
import { use } from "../mixins.js";
|
|
4
|
+
|
|
5
|
+
//#region src/expect/instance-of-shorthand.ts
|
|
6
|
+
const constructors = [
|
|
7
|
+
Date,
|
|
8
|
+
Map,
|
|
9
|
+
Set,
|
|
10
|
+
WeakMap,
|
|
11
|
+
WeakSet
|
|
12
|
+
];
|
|
13
|
+
use(Object.fromEntries(constructors.map((constructor) => {
|
|
14
|
+
return [constructor.name, {
|
|
15
|
+
type: "method",
|
|
16
|
+
value: ({ inverted, value }) => () => {
|
|
17
|
+
if (inverted) notInstanceOf(value, constructor);
|
|
18
|
+
else instanceOf(value, constructor);
|
|
19
|
+
}
|
|
20
|
+
}];
|
|
21
|
+
})));
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { };
|
|
25
|
+
//# sourceMappingURL=instance-of-shorthand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-of-shorthand.js","names":[],"sources":["../../src/expect/instance-of-shorthand.ts"],"sourcesContent":["import { instanceOf, notInstanceOf } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface DateExpect {\n /**\n * check if value is an instance of Date\n */\n Date(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ObjectExpect<T> {\n /**\n * check if value is an instance of Map\n */\n Map(): this;\n /**\n * check if value is an instance of Set\n */\n Set(): this;\n /**\n * check if value is an instance of WeakMap\n */\n WeakMap(): this;\n /**\n * check if value is an instance of WeakSet\n */\n WeakSet(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface MapExpect<T> {\n /**\n * check if value is an instance of Map\n */\n Map(): this;\n }\n}\n\nconst constructors = [Date, Map, Set, WeakMap, WeakSet];\n\nuse(\n Object.fromEntries(\n constructors.map((constructor) => {\n return [\n constructor.name,\n {\n type: 'method',\n value:\n ({ inverted, value }) =>\n () => {\n if (inverted) {\n notInstanceOf(value, constructor);\n } else {\n instanceOf(value, constructor);\n }\n }\n }\n ];\n })\n )\n);\n"],"mappings":";;;;;AAsCA,MAAM,eAAe;CAAC;CAAM;CAAK;CAAK;CAAS;CAAQ;AAEvD,IACI,OAAO,YACH,aAAa,KAAK,gBAAgB;AAC9B,QAAO,CACH,YAAY,MACZ;EACI,MAAM;EACN,QACK,EAAE,UAAU,kBACP;AACF,OAAI,SACA,eAAc,OAAO,YAAY;OAEjC,YAAW,OAAO,YAAY;;EAG7C,CACJ;EACH,CACL,CACJ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const require_instance_of = require('../assert/instance-of.cjs');
|
|
2
|
+
require('../assert.cjs');
|
|
3
|
+
const require_mixins = require('../mixins.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/expect/instance-of.ts
|
|
6
|
+
require_mixins.use({ instanceOf: {
|
|
7
|
+
type: "method",
|
|
8
|
+
value: ({ value, inverted }) => (constructor) => {
|
|
9
|
+
if (inverted) require_instance_of.notInstanceOf(value, constructor);
|
|
10
|
+
else require_instance_of.instanceOf(value, constructor);
|
|
11
|
+
}
|
|
12
|
+
} });
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
//# sourceMappingURL=instance-of.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-of.cjs","names":["use"],"sources":["../../src/expect/instance-of.ts"],"sourcesContent":["import { notInstanceOf, instanceOf } from '../assert.js';\nimport { use } from '../mixins.js';\nimport { type Constructor } from '../utils/process-error.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ValueExpect<T> {\n /**\n * check if instance of value\n * @param constructor - The constructor function to check against\n */\n instanceOf(constructor: Constructor): this;\n }\n}\n\nuse({\n instanceOf: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (constructor: Constructor) => {\n if (inverted) {\n notInstanceOf(value, constructor);\n } else {\n instanceOf(value, constructor);\n }\n }\n }\n});\n"],"mappings":";;;;;AAeAA,mBAAI,EACA,YAAY;CACR,MAAM;CACN,QACK,EAAE,OAAO,gBACT,gBAA6B;AAC1B,MAAI,SACA,mCAAc,OAAO,YAAY;MAEjC,gCAAW,OAAO,YAAY;;CAG7C,EACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { instanceOf, notInstanceOf } from "../assert/instance-of.js";
|
|
2
|
+
import "../assert.js";
|
|
3
|
+
import { use } from "../mixins.js";
|
|
4
|
+
|
|
5
|
+
//#region src/expect/instance-of.ts
|
|
6
|
+
use({ instanceOf: {
|
|
7
|
+
type: "method",
|
|
8
|
+
value: ({ value, inverted }) => (constructor) => {
|
|
9
|
+
if (inverted) notInstanceOf(value, constructor);
|
|
10
|
+
else instanceOf(value, constructor);
|
|
11
|
+
}
|
|
12
|
+
} });
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { };
|
|
16
|
+
//# sourceMappingURL=instance-of.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-of.js","names":[],"sources":["../../src/expect/instance-of.ts"],"sourcesContent":["import { notInstanceOf, instanceOf } from '../assert.js';\nimport { use } from '../mixins.js';\nimport { type Constructor } from '../utils/process-error.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ValueExpect<T> {\n /**\n * check if instance of value\n * @param constructor - The constructor function to check against\n */\n instanceOf(constructor: Constructor): this;\n }\n}\n\nuse({\n instanceOf: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (constructor: Constructor) => {\n if (inverted) {\n notInstanceOf(value, constructor);\n } else {\n instanceOf(value, constructor);\n }\n }\n }\n});\n"],"mappings":";;;;;AAeA,IAAI,EACA,YAAY;CACR,MAAM;CACN,QACK,EAAE,OAAO,gBACT,gBAA6B;AAC1B,MAAI,SACA,eAAc,OAAO,YAAY;MAEjC,YAAW,OAAO,YAAY;;CAG7C,EACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const require_has_keys = require('../assert/has-keys.cjs');
|
|
2
|
+
require('../assert.cjs');
|
|
3
|
+
const require_mixins = require('../mixins.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/expect/keys.ts
|
|
6
|
+
require_mixins.use({ keys: {
|
|
7
|
+
type: "method",
|
|
8
|
+
value: ({ value, inverted }) => (keys) => {
|
|
9
|
+
if (inverted) require_has_keys.notHasKeys(value, keys);
|
|
10
|
+
else require_has_keys.hasKeys(value, keys);
|
|
11
|
+
}
|
|
12
|
+
} });
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
//# sourceMappingURL=keys.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keys.cjs","names":["use"],"sources":["../../src/expect/keys.ts"],"sourcesContent":["import { hasKeys, notHasKeys } from '../assert.js';\nimport { use } from '../mixins.js';\n\ntype InferMapKeys<T> = T extends Map<infer K, any> ? K : never;\n\ndeclare module '../expect.types' {\n interface ObjectExpect<T> {\n /**\n * Check if value has keys\n */\n keys<K extends keyof T>(keys: K[] | K): this;\n }\n interface MapExpect<T> {\n /**\n * Check if value has keys\n */\n keys<K extends InferMapKeys<T>>(keys: K[] | K): this;\n }\n}\n\nuse({\n keys: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (keys) => {\n if (inverted) {\n notHasKeys(value, keys);\n } else {\n hasKeys(value, keys);\n }\n }\n }\n});\n"],"mappings":";;;;;AAoBAA,mBAAI,EACA,MAAM;CACF,MAAM;CACN,QACK,EAAE,OAAO,gBACT,SAAS;AACN,MAAI,SACA,6BAAW,OAAO,KAAK;MAEvB,0BAAQ,OAAO,KAAK;;CAGnC,EACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { hasKeys, notHasKeys } from "../assert/has-keys.js";
|
|
2
|
+
import "../assert.js";
|
|
3
|
+
import { use } from "../mixins.js";
|
|
4
|
+
|
|
5
|
+
//#region src/expect/keys.ts
|
|
6
|
+
use({ keys: {
|
|
7
|
+
type: "method",
|
|
8
|
+
value: ({ value, inverted }) => (keys) => {
|
|
9
|
+
if (inverted) notHasKeys(value, keys);
|
|
10
|
+
else hasKeys(value, keys);
|
|
11
|
+
}
|
|
12
|
+
} });
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { };
|
|
16
|
+
//# sourceMappingURL=keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keys.js","names":[],"sources":["../../src/expect/keys.ts"],"sourcesContent":["import { hasKeys, notHasKeys } from '../assert.js';\nimport { use } from '../mixins.js';\n\ntype InferMapKeys<T> = T extends Map<infer K, any> ? K : never;\n\ndeclare module '../expect.types' {\n interface ObjectExpect<T> {\n /**\n * Check if value has keys\n */\n keys<K extends keyof T>(keys: K[] | K): this;\n }\n interface MapExpect<T> {\n /**\n * Check if value has keys\n */\n keys<K extends InferMapKeys<T>>(keys: K[] | K): this;\n }\n}\n\nuse({\n keys: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (keys) => {\n if (inverted) {\n notHasKeys(value, keys);\n } else {\n hasKeys(value, keys);\n }\n }\n }\n});\n"],"mappings":";;;;;AAoBA,IAAI,EACA,MAAM;CACF,MAAM;CACN,QACK,EAAE,OAAO,gBACT,SAAS;AACN,MAAI,SACA,YAAW,OAAO,KAAK;MAEvB,SAAQ,OAAO,KAAK;;CAGnC,EACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const require_has_size = require('../assert/has-size.cjs');
|
|
2
|
+
require('../assert.cjs');
|
|
3
|
+
const require_mixins = require('../mixins.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/expect/length.ts
|
|
6
|
+
require_mixins.use({
|
|
7
|
+
sizeOf: {
|
|
8
|
+
type: "alias",
|
|
9
|
+
value: "lengthOf"
|
|
10
|
+
},
|
|
11
|
+
lengthOf: {
|
|
12
|
+
type: "method",
|
|
13
|
+
value: ({ value, inverted }) => (length, message) => {
|
|
14
|
+
if (inverted) require_has_size.notHasSize(value, length, message);
|
|
15
|
+
else require_has_size.hasSize(value, length, message);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
//# sourceMappingURL=length.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"length.cjs","names":["use"],"sources":["../../src/expect/length.ts"],"sourcesContent":["import { hasSize, notHasSize } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ObjectExpect<T> {\n /**\n * check for object/array/Map/Set/string to have a certain size\n */\n sizeOf(size: number, message?: string): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface MapExpect<T> {\n /**\n * check for Map to have a certain size\n */\n sizeOf(size: number, message?: string): this;\n }\n interface StringExpect {\n /**\n * check for string to have a certain size\n */\n lengthOf(length: number, message?: string): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ArrayExpect<T> {\n /**\n * check for array length\n */\n lengthOf(length: number, message?: string): this;\n }\n}\n\nuse({\n sizeOf: { type: 'alias', value: 'lengthOf' },\n lengthOf: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (length: number, message?: string) => {\n if (inverted) {\n notHasSize(value, length, message);\n } else {\n hasSize(value, length, message);\n }\n }\n }\n});\n"],"mappings":";;;;;AAiCAA,mBAAI;CACA,QAAQ;EAAE,MAAM;EAAS,OAAO;EAAY;CAC5C,UAAU;EACN,MAAM;EACN,QACK,EAAE,OAAO,gBACT,QAAgB,YAAqB;AAClC,OAAI,SACA,6BAAW,OAAO,QAAQ,QAAQ;OAElC,0BAAQ,OAAO,QAAQ,QAAQ;;EAG9C;CACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { hasSize, notHasSize } from "../assert/has-size.js";
|
|
2
|
+
import "../assert.js";
|
|
3
|
+
import { use } from "../mixins.js";
|
|
4
|
+
|
|
5
|
+
//#region src/expect/length.ts
|
|
6
|
+
use({
|
|
7
|
+
sizeOf: {
|
|
8
|
+
type: "alias",
|
|
9
|
+
value: "lengthOf"
|
|
10
|
+
},
|
|
11
|
+
lengthOf: {
|
|
12
|
+
type: "method",
|
|
13
|
+
value: ({ value, inverted }) => (length, message) => {
|
|
14
|
+
if (inverted) notHasSize(value, length, message);
|
|
15
|
+
else hasSize(value, length, message);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { };
|
|
22
|
+
//# sourceMappingURL=length.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"length.js","names":[],"sources":["../../src/expect/length.ts"],"sourcesContent":["import { hasSize, notHasSize } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ObjectExpect<T> {\n /**\n * check for object/array/Map/Set/string to have a certain size\n */\n sizeOf(size: number, message?: string): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface MapExpect<T> {\n /**\n * check for Map to have a certain size\n */\n sizeOf(size: number, message?: string): this;\n }\n interface StringExpect {\n /**\n * check for string to have a certain size\n */\n lengthOf(length: number, message?: string): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ArrayExpect<T> {\n /**\n * check for array length\n */\n lengthOf(length: number, message?: string): this;\n }\n}\n\nuse({\n sizeOf: { type: 'alias', value: 'lengthOf' },\n lengthOf: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (length: number, message?: string) => {\n if (inverted) {\n notHasSize(value, length, message);\n } else {\n hasSize(value, length, message);\n }\n }\n }\n});\n"],"mappings":";;;;;AAiCA,IAAI;CACA,QAAQ;EAAE,MAAM;EAAS,OAAO;EAAY;CAC5C,UAAU;EACN,MAAM;EACN,QACK,EAAE,OAAO,gBACT,QAAgB,YAAqB;AAClC,OAAI,SACA,YAAW,OAAO,QAAQ,QAAQ;OAElC,SAAQ,OAAO,QAAQ,QAAQ;;EAG9C;CACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const require_less_than_equal = require('../assert/less-than-equal.cjs');
|
|
2
|
+
require('../assert.cjs');
|
|
3
|
+
const require_mixins = require('../mixins.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/expect/less-than-equal.ts
|
|
6
|
+
require_mixins.use({
|
|
7
|
+
lessThanOrEqual: {
|
|
8
|
+
type: "method",
|
|
9
|
+
value: ({ value, inverted }) => (other) => {
|
|
10
|
+
if (inverted) require_less_than_equal.notLessThanEqual(value, other);
|
|
11
|
+
else require_less_than_equal.lessThanEqual(value, other);
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
lte: {
|
|
15
|
+
type: "alias",
|
|
16
|
+
value: "lessThanOrEqual"
|
|
17
|
+
},
|
|
18
|
+
atMost: {
|
|
19
|
+
type: "alias",
|
|
20
|
+
value: "lessThanOrEqual"
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
//# sourceMappingURL=less-than-equal.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"less-than-equal.cjs","names":["use"],"sources":["../../src/expect/less-than-equal.ts"],"sourcesContent":["import { lessThanEqual, notLessThanEqual } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface NumberExpect<T> {\n /**\n * check if actual is less than or equal to expected\n */\n lessThanOrEqual(value: T): this;\n /**\n * check if actual is less than or equal to expected\n */\n lte(value: T): this;\n /**\n * check if actual is less than or equal to expected\n */\n atMost(value: T): this;\n }\n interface DateExpect<T> {\n /**\n * check if actual is less than or equal to expected\n */\n lessThanOrEqual(value: T): this;\n /**\n * check if actual is less than or equal to expected\n */\n lte(value: T): this;\n /**\n * check if actual is less than or equal to expected\n */\n atMost(value: T): this;\n }\n}\n\nuse({\n lessThanOrEqual: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (other: any) => {\n if (inverted) {\n notLessThanEqual(value, other);\n } else {\n lessThanEqual(value, other);\n }\n }\n },\n lte: { type: 'alias', value: 'lessThanOrEqual' },\n atMost: { type: 'alias', value: 'lessThanOrEqual' }\n});\n"],"mappings":";;;;;AAkCAA,mBAAI;CACA,iBAAiB;EACb,MAAM;EACN,QACK,EAAE,OAAO,gBACT,UAAe;AACZ,OAAI,SACA,0CAAiB,OAAO,MAAM;OAE9B,uCAAc,OAAO,MAAM;;EAG1C;CACD,KAAK;EAAE,MAAM;EAAS,OAAO;EAAmB;CAChD,QAAQ;EAAE,MAAM;EAAS,OAAO;EAAmB;CACtD,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { lessThanEqual, notLessThanEqual } from "../assert/less-than-equal.js";
|
|
2
|
+
import "../assert.js";
|
|
3
|
+
import { use } from "../mixins.js";
|
|
4
|
+
|
|
5
|
+
//#region src/expect/less-than-equal.ts
|
|
6
|
+
use({
|
|
7
|
+
lessThanOrEqual: {
|
|
8
|
+
type: "method",
|
|
9
|
+
value: ({ value, inverted }) => (other) => {
|
|
10
|
+
if (inverted) notLessThanEqual(value, other);
|
|
11
|
+
else lessThanEqual(value, other);
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
lte: {
|
|
15
|
+
type: "alias",
|
|
16
|
+
value: "lessThanOrEqual"
|
|
17
|
+
},
|
|
18
|
+
atMost: {
|
|
19
|
+
type: "alias",
|
|
20
|
+
value: "lessThanOrEqual"
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { };
|
|
26
|
+
//# sourceMappingURL=less-than-equal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"less-than-equal.js","names":[],"sources":["../../src/expect/less-than-equal.ts"],"sourcesContent":["import { lessThanEqual, notLessThanEqual } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface NumberExpect<T> {\n /**\n * check if actual is less than or equal to expected\n */\n lessThanOrEqual(value: T): this;\n /**\n * check if actual is less than or equal to expected\n */\n lte(value: T): this;\n /**\n * check if actual is less than or equal to expected\n */\n atMost(value: T): this;\n }\n interface DateExpect<T> {\n /**\n * check if actual is less than or equal to expected\n */\n lessThanOrEqual(value: T): this;\n /**\n * check if actual is less than or equal to expected\n */\n lte(value: T): this;\n /**\n * check if actual is less than or equal to expected\n */\n atMost(value: T): this;\n }\n}\n\nuse({\n lessThanOrEqual: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (other: any) => {\n if (inverted) {\n notLessThanEqual(value, other);\n } else {\n lessThanEqual(value, other);\n }\n }\n },\n lte: { type: 'alias', value: 'lessThanOrEqual' },\n atMost: { type: 'alias', value: 'lessThanOrEqual' }\n});\n"],"mappings":";;;;;AAkCA,IAAI;CACA,iBAAiB;EACb,MAAM;EACN,QACK,EAAE,OAAO,gBACT,UAAe;AACZ,OAAI,SACA,kBAAiB,OAAO,MAAM;OAE9B,eAAc,OAAO,MAAM;;EAG1C;CACD,KAAK;EAAE,MAAM;EAAS,OAAO;EAAmB;CAChD,QAAQ;EAAE,MAAM;EAAS,OAAO;EAAmB;CACtD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const require_less_than = require('../assert/less-than.cjs');
|
|
2
|
+
require('../assert.cjs');
|
|
3
|
+
const require_mixins = require('../mixins.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/expect/less-than.ts
|
|
6
|
+
require_mixins.use({
|
|
7
|
+
lessThan: {
|
|
8
|
+
type: "method",
|
|
9
|
+
value: ({ value, inverted }) => (other) => {
|
|
10
|
+
if (inverted) require_less_than.notLessThan(value, other);
|
|
11
|
+
else require_less_than.lessThan(value, other);
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
lt: {
|
|
15
|
+
type: "alias",
|
|
16
|
+
value: "lessThan"
|
|
17
|
+
},
|
|
18
|
+
below: {
|
|
19
|
+
type: "alias",
|
|
20
|
+
value: "lessThan"
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
//# sourceMappingURL=less-than.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"less-than.cjs","names":["use"],"sources":["../../src/expect/less-than.ts"],"sourcesContent":["import { lessThan, notLessThan } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface NumberExpect<T> {\n /**\n * check if actual is less than expected\n */\n lessThan(value: T): this;\n /**\n * check if actual is less than expected\n */\n lt(value: T): this;\n /**\n * check if actual is less than expected\n */\n below(value: T): this;\n }\n interface DateExpect<T> {\n /**\n * check if actual is less than expected\n */\n lessThan(value: T): this;\n /**\n * check if actual is less than expected\n */\n lt(value: T): this;\n /**\n * check if actual is less than expected\n */\n below(value: T): this;\n }\n}\n\nuse({\n lessThan: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (other: any) => {\n if (inverted) {\n notLessThan(value, other);\n } else {\n lessThan(value, other);\n }\n }\n },\n lt: { type: 'alias', value: 'lessThan' },\n below: { type: 'alias', value: 'lessThan' }\n});\n"],"mappings":";;;;;AAkCAA,mBAAI;CACA,UAAU;EACN,MAAM;EACN,QACK,EAAE,OAAO,gBACT,UAAe;AACZ,OAAI,SACA,+BAAY,OAAO,MAAM;OAEzB,4BAAS,OAAO,MAAM;;EAGrC;CACD,IAAI;EAAE,MAAM;EAAS,OAAO;EAAY;CACxC,OAAO;EAAE,MAAM;EAAS,OAAO;EAAY;CAC9C,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { lessThan, notLessThan } from "../assert/less-than.js";
|
|
2
|
+
import "../assert.js";
|
|
3
|
+
import { use } from "../mixins.js";
|
|
4
|
+
|
|
5
|
+
//#region src/expect/less-than.ts
|
|
6
|
+
use({
|
|
7
|
+
lessThan: {
|
|
8
|
+
type: "method",
|
|
9
|
+
value: ({ value, inverted }) => (other) => {
|
|
10
|
+
if (inverted) notLessThan(value, other);
|
|
11
|
+
else lessThan(value, other);
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
lt: {
|
|
15
|
+
type: "alias",
|
|
16
|
+
value: "lessThan"
|
|
17
|
+
},
|
|
18
|
+
below: {
|
|
19
|
+
type: "alias",
|
|
20
|
+
value: "lessThan"
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { };
|
|
26
|
+
//# sourceMappingURL=less-than.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"less-than.js","names":[],"sources":["../../src/expect/less-than.ts"],"sourcesContent":["import { lessThan, notLessThan } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface NumberExpect<T> {\n /**\n * check if actual is less than expected\n */\n lessThan(value: T): this;\n /**\n * check if actual is less than expected\n */\n lt(value: T): this;\n /**\n * check if actual is less than expected\n */\n below(value: T): this;\n }\n interface DateExpect<T> {\n /**\n * check if actual is less than expected\n */\n lessThan(value: T): this;\n /**\n * check if actual is less than expected\n */\n lt(value: T): this;\n /**\n * check if actual is less than expected\n */\n below(value: T): this;\n }\n}\n\nuse({\n lessThan: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (other: any) => {\n if (inverted) {\n notLessThan(value, other);\n } else {\n lessThan(value, other);\n }\n }\n },\n lt: { type: 'alias', value: 'lessThan' },\n below: { type: 'alias', value: 'lessThan' }\n});\n"],"mappings":";;;;;AAkCA,IAAI;CACA,UAAU;EACN,MAAM;EACN,QACK,EAAE,OAAO,gBACT,UAAe;AACZ,OAAI,SACA,aAAY,OAAO,MAAM;OAEzB,UAAS,OAAO,MAAM;;EAGrC;CACD,IAAI;EAAE,MAAM;EAAS,OAAO;EAAY;CACxC,OAAO;EAAE,MAAM;EAAS,OAAO;EAAY;CAC9C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const require_match = require('../assert/match.cjs');
|
|
2
|
+
require('../assert.cjs');
|
|
3
|
+
const require_mixins = require('../mixins.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/expect/match.ts
|
|
6
|
+
require_mixins.use({ match: {
|
|
7
|
+
type: "method",
|
|
8
|
+
value: ({ value, inverted }) => (regex) => {
|
|
9
|
+
if (inverted) require_match.notMatch(value, regex);
|
|
10
|
+
else require_match.match(value, regex);
|
|
11
|
+
}
|
|
12
|
+
} });
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
//# sourceMappingURL=match.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match.cjs","names":["use"],"sources":["../../src/expect/match.ts"],"sourcesContent":["import { match, notMatch } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface StringExpect<T> {\n /**\n * check if string matches regex\n */\n match(regex: RegExp): this;\n }\n}\n\nuse({\n match: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (regex: RegExp) => {\n if (inverted) {\n notMatch(value, regex);\n } else {\n match(value, regex);\n }\n }\n }\n});\n"],"mappings":";;;;;AAaAA,mBAAI,EACA,OAAO;CACH,MAAM;CACN,QACK,EAAE,OAAO,gBACT,UAAkB;AACf,MAAI,SACA,wBAAS,OAAO,MAAM;MAEtB,qBAAM,OAAO,MAAM;;CAGlC,EACJ,CAAC"}
|