{"name":"nanoassert","version":"3.0.1","keywords":["assert","unassert","power-assert","tiny","nano","pico"],"author":{"name":"Emil Bay","email":"github@tixz.dk"},"license":"ISC","_id":"nanoassert@3.0.1","maintainers":[{"name":"emilbayes","email":"github@tixz.dk"}],"homepage":"https://github.com/emilbayes/nanoassert#readme","bugs":{"url":"https://github.com/emilbayes/nanoassert/issues"},"dist":{"shasum":"34b237876569d75b2642d10c421082dcee041c91","tarball":"http://registry-npm.ywwl.com/nanoassert/download/nanoassert-3.0.1.tgz","fileCount":8,"integrity":"sha512-IZEsVxDmY1XJj13A6j/6gVutKHq5sDGWZXYSneBEWNmbfOGvSvnRc5ZYxncpXhuOJgdmJQ85u1FxmdcZRse0xA==","signatures":[{"sig":"MEUCIQC0wnzrLOjSe+oXkQaB3Op4PeyGQodZ+Lzkt3voZyS1jwIgXYS105azzVa2l2wkxbmLGYYKhiNhSFVjuSaqq238svI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5147,"size":2424,"noattachment":false,"key":"/nanoassert/-/nanoassert-3.0.1.tgz"},"main":"index.js","types":"./index.d.ts","gitHead":"c85b32802188586694b87ceff403a781fbacaedf","scripts":{"test":"tape test.js"},"_npmUser":{"name":"emilbayes","actor":{"name":"emilbayes","type":"user","email":"github@tixz.dk"},"email":"github@tixz.dk"},"repository":{"url":"git+https://github.com/emilbayes/nanoassert.git","type":"git"},"_npmVersion":"11.4.2","description":"Nanoscale assertion module","directories":{},"_nodeVersion":"24.2.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"tape":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/nanoassert_3.0.1_1751118793376_0.3587546075606478","host":"s3://npm-registry-packages-npm-production"},"readme":"# `nanoassert`\n\n[![NPM](https://github.com/emilbayes/nanoassert/actions/workflows/npm.yml/badge.svg)](https://github.com/emilbayes/nanoassert/actions/workflows/npm.yml)\n\n> Nanoscale assertion module\n\n## Usage\n\n```js\nconst assert = require('nanoassert')\n\nassert(a !== b, `${a} !== ${b}`)\n```\n\n## API\n\n### `assert(predicate, [message])`\n\nAssert that `predicate` is truthy, otherwise throw `AssertionError` with\noptional `message`. In Javascript runtimes that support `Error.captureStackTrace`, you will get a nicer\nstack trace with this error.\nIf you want friendlier messages you can use template strings to show the\nassertion made like in the example above.\n\n## Why\n\nI like to write public facing code very defensively, but have reservations about\nthe size incurred by the `assert` module. I only use the top-level `assert`\nmethod anyway.\n\n## `nanoassert@^1.1.0`\n\nDocs for the previous version, which is used by many modules on npm, can be\n[found here](https://github.com/emilbayes/nanoassert/tree/v1.1.0)\n\n## `nanoassert@^3.0.0`\n\nModernise `nanoassert` some, and add the small type definition from `DefinitelyTyped`. Functionally there should be no changes for most users, but the `name` property of the `AssertionError` is no longer set on the prototype, and newer syntax is employed, which might break some downstream modules.\n\nThank you to the folks that created and maintained the original type definitions.\n\n## Install\n\n```sh\nnpm install nanoassert\n```\n\n## License\n\n[ISC](LICENSE)\n","publish_time":1751118793546,"_cnpm_publish_time":1751118793546,"dist-tags":{"latest":"3.1.0"}}