{"name":"nanoassert","version":"3.0.0","keywords":["assert","unassert","power-assert","tiny","nano","pico"],"author":{"name":"Emil Bay","email":"github@tixz.dk"},"license":"ISC","_id":"nanoassert@3.0.0","maintainers":[{"name":"emilbayes","email":"github@tixz.dk"}],"homepage":"https://github.com/emilbayes/nanoassert#readme","bugs":{"url":"https://github.com/emilbayes/nanoassert/issues"},"dist":{"shasum":"f5b1a86f319d069810b88b8fd5b355b6ec715ae2","tarball":"http://registry-npm.ywwl.com/nanoassert/download/nanoassert-3.0.0.tgz","fileCount":8,"integrity":"sha512-wn2/RngcpiQuxlzwNvUdS9CKf2NCZjleiGzpupnv+nCy7QjvkhPOmRgrAMS5ajjWQ6zPyz5xLfeAu6P598I6bA==","signatures":[{"sig":"MEQCIEhR6UJBYDQIUqhb3pJSsdYyLQQo0AL/V1LQmHQHq8nxAiAZiiZdmNNHpOdBCjwrjG9jFJ7G0sJp67JvxKkBFcDmtw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5130,"size":2418,"noattachment":false,"key":"/nanoassert/-/nanoassert-3.0.0.tgz"},"main":"index.js","types":"./index.d.ts","gitHead":"0935c27963b5797c9fe5240082504234309a5daa","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.0_1751118235286_0.8366887840062993","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":1751118235485,"_cnpm_publish_time":1751118235485,"dist-tags":{"latest":"3.1.0"}}