{"_id":"@bodil/opt-vitest","_rev":"2-050e2eefa8880784b814d68ccf9d90a7","name":"@bodil/opt-vitest","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@bodil/opt-vitest","version":"1.0.0","license":"MPL-2.0+","_id":"@bodil/opt-vitest@1.0.0","maintainers":[{"name":"bodil","email":"bodil@bodil.org"}],"homepage":"https://github.com/bodil/opt-vitest#readme","bugs":{"url":"https://github.com/bodil/opt-vitest/issues"},"dist":{"shasum":"ee44ac3b56129d8406170763cc94997f6e045967","tarball":"https://registry.npmjs.org/@bodil/opt-vitest/-/opt-vitest-1.0.0.tgz","fileCount":5,"integrity":"sha512-t+x7noBwF2/uzOndO4tP3OIxUaKiCWIOJEpIKN6IB+gW7Oz6GElmSBYTGrkhIWWJOI4PeKOOvgE5fVQmSmJCiQ==","signatures":[{"sig":"MEUCIGsX74reIdCCY8SDbI0jbBQqT6EgCJNklF8ibMRWUxkwAiEAiO2yvkaxYYTdGueB15hDb9rgCEk6L6FJV1LBE7KpjHs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22873},"_from":"file:bodil-opt-vitest-1.0.0.tgz","types":"./types/mod.d.ts","module":"./esm/mod.js","exports":{".":{"import":{"types":"./types/mod.d.ts","default":"./esm/mod.js"}}},"scripts":{"test":"vitest run","prepublish":"tsc"},"_npmUser":{"name":"bodil","email":"bodil@bodil.org"},"_resolved":"/home/bodil/.cache/tmp/741b91bef68d44ce6cf1dc21f7c9eaea/bodil-opt-vitest-1.0.0.tgz","_integrity":"sha512-t+x7noBwF2/uzOndO4tP3OIxUaKiCWIOJEpIKN6IB+gW7Oz6GElmSBYTGrkhIWWJOI4PeKOOvgE5fVQmSmJCiQ==","repository":{"url":"git+https://github.com/bodil/opt-vitest.git","type":"git"},"_npmVersion":"8.19.2","description":"Vitest matchers for @bodil/opt","directories":{},"_nodeVersion":"20.3.0","_hasShrinkwrap":false,"devDependencies":{"vitest":">=0.31.0","@bodil/opt":">=0.2.0","@vitest/expect":">=0.31.0"},"peerDependencies":{"vitest":">=0.31.0","@bodil/opt":">=0.2.0","@vitest/expect":">=0.31.0"},"_npmOperationalInternal":{"tmp":"tmp/opt-vitest_1.0.0_1687189947788_0.22390156100608172","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@bodil/opt-vitest","version":"1.1.0","description":"Vitest matchers for @bodil/opt","license":"MPL-2.0+","homepage":"https://codeberg.org/bodil/opt-vitest","repository":{"type":"git","url":"git+https://codeberg.org/bodil/opt-vitest.git"},"bugs":{"url":"https://codeberg.org/bodil/opt-vitest/issues"},"module":"./dist/mod.js","types":"./dist/mod.d.ts","exports":{".":{"import":{"types":"./dist/mod.d.ts","import":"./dist/mod.js"}}},"publishConfig":{"access":"public"},"devDependencies":{"@bodil/opt":"^0.4.1","@vitest/expect":"^3.2.4","typescript":"^5.9.2","vitest":"^3.2.4"},"peerDependencies":{"@bodil/opt":">=0.4.1","@vitest/expect":">=3","vitest":">=3"},"scripts":{"build":"tsc","prepublish":"tsc","test":"vitest --run"},"_id":"@bodil/opt-vitest@1.1.0","_integrity":"sha512-EmicaPuKaCqhbuLtnRoqUJH+b5drmSUDJUPyLKxgdcfhgsK3HHPC5RnagOXKqErGwsB3AYIUekmjdJqldaiQ1w==","_resolved":"/home/bodil/.cache/tmp/952511cef4c67860f68384b10fb5820b/bodil-opt-vitest-1.1.0.tgz","_from":"file:bodil-opt-vitest-1.1.0.tgz","_nodeVersion":"24.5.0","_npmVersion":"11.5.2","dist":{"integrity":"sha512-EmicaPuKaCqhbuLtnRoqUJH+b5drmSUDJUPyLKxgdcfhgsK3HHPC5RnagOXKqErGwsB3AYIUekmjdJqldaiQ1w==","shasum":"4d0f5ce1abc2db4b03c3416c348f51302819b3bf","tarball":"https://registry.npmjs.org/@bodil/opt-vitest/-/opt-vitest-1.1.0.tgz","fileCount":11,"unpackedSize":34707,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDu9fQEyJO/UIahEdtVZbqnbUujhpjAVIbs7oCWAmKJRQIhAIEOTmziOS4GIbobAnr17zSiW+XseY6dXCGx/k6tiwhE"}]},"_npmUser":{"name":"bodil","email":"bodil@bodil.org"},"directories":{},"maintainers":[{"name":"bodil","email":"bodil@bodil.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/opt-vitest_1.1.0_1755002238449_0.9962329367414591"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-19T15:52:27.703Z","modified":"2025-08-12T12:37:18.862Z","1.0.0":"2023-06-19T15:52:27.962Z","1.1.0":"2025-08-12T12:37:18.702Z"},"bugs":{"url":"https://codeberg.org/bodil/opt-vitest/issues"},"license":"MPL-2.0+","homepage":"https://codeberg.org/bodil/opt-vitest","repository":{"type":"git","url":"git+https://codeberg.org/bodil/opt-vitest.git"},"description":"Vitest matchers for @bodil/opt","maintainers":[{"name":"bodil","email":"bodil@bodil.org"}],"readme":"# opt-vitest\n\n[Vitest](https://vitest.dev/) matchers for [opt](https://github.com/bodil/opt).\n\n## Usage\n\nTo install the new matchers, import this package into your test file:\n\n```typescript\nimport \"@bodil/opt-vitest\";\n```\n\nThis extends Vitest's `expect` object with four methods: `isSome()`, `isNone()`,\n`isOk()` and `isErr()`.\n\nAll of these can be called without arguments, which will assert only that the\nvalue under inspection is of the expected type. You can also pass an expected\nvalue, which will be checked for equality with the value contained within the\n`Result` or `Option`, or you can pass a function which will be passed the\ncontained value as its first and only argument, inside which you could do\nfurther `expect`ing, or throw an error to fail the test.\n\n## Example\n\n```typescript\nconst okValue: Result<string, Error> = Ok(\"all good!\");\n\nexpect(okValue).isOk();\nexpect(okValue).not.isErr();\nexpect(okValue).isOk(\"all good!\");\nexpect(okValue).isOk((value) => expect(value).eq(\"all good!));\n```\n\n## Licence\n\nCopyright 2023 Bodil Stokke\n\nThis software is subject to the terms of the Mozilla Public License, v. 2.0. If\na copy of the MPL was not distributed with this file, You can obtain one at\n<http://mozilla.org/MPL/2.0/>.\n","readmeFilename":"README.md"}