{"_id":"simple-assert","_rev":"4122252","name":"simple-assert","description":"Vanilla Assertions","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"}],"time":{"modified":"2026-02-13T22:18:17.000Z","created":"2013-07-18T20:40:09.325Z","2.0.0":"2023-07-21T19:38:01.004Z","1.0.0":"2013-07-18T20:40:09.325Z"},"users":{},"author":{"name":"Jake Luer","email":"jake@alogicalparadox.com","url":"http://alogicalparadox.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/chaijs/simple-assert.git"},"versions":{"2.0.0":{"name":"simple-assert","version":"2.0.0","description":"Vanilla Assertions","author":{"name":"Jake Luer","email":"jake@alogicalparadox.com","url":"http://alogicalparadox.com"},"license":"MIT","keywords":[],"repository":{"type":"git","url":"git+ssh://git@github.com/chaijs/simple-assert.git"},"type":"module","engines":{"node":">= 14.16"},"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"tsc && rollup -c rollup.config.js","pretest":"npm run build","test":"karma start karma.conf.cjs"},"dependencies":{"assertion-error":"^2.0.0"},"devDependencies":{"@rollup/plugin-node-resolve":"^13.0.5","karma":"^6.3.4","karma-chrome-launcher":"^3.1.0","karma-mocha":"^2.0.1","mocha":"^9.1.2","rollup":"^2.58.0","typescript":"^4.4.3"},"gitHead":"92fd629932832a49ff75195378095af891f674f1","bugs":{"url":"https://github.com/chaijs/simple-assert/issues"},"homepage":"https://github.com/chaijs/simple-assert#readme","_id":"simple-assert@2.0.0","_nodeVersion":"18.14.2","_npmVersion":"9.6.4","dist":{"shasum":"8fb3144d0ec493ae913f2e8bd3b7f28664548fdd","size":4033,"noattachment":false,"key":"/simple-assert/-/simple-assert-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/simple-assert/download/simple-assert-2.0.0.tgz"},"_npmUser":{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"},"directories":{},"maintainers":[{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simple-assert_2.0.0_1689968280787_0.8215103932461061"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-07-21T19:38:01.004Z","publish_time":1689968281004,"_source_registry_name":"default","_cnpm_publish_time":1689968281004},"1.0.0":{"name":"simple-assert","version":"1.0.0","description":"Vanilla Assertions","author":{"name":"Jake Luer","email":"jake@alogicalparadox.com","url":"http://alogicalparadox.com"},"license":"MIT","keywords":[],"repository":{"type":"git","url":"git@github.com:chaijs/simple-assert.git"},"engines":{"node":"*"},"main":"./index","scripts":{"test":"make test"},"dependencies":{"assertion-error":"1.0.0"},"devDependencies":{"component":"*","mocha":"*","mocha-phantomjs":"*"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/chaijs/simple-assert/issues"},"_id":"simple-assert@1.0.0","dist":{"shasum":"53f1790000d714424124290780bc2a3e511cf0ef","size":2349,"noattachment":false,"key":"/simple-assert/-/simple-assert-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/simple-assert/download/simple-assert-1.0.0.tgz"},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"jakeluer","email":"jake@alogicalparadox.com"},"maintainers":[{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"}],"directories":{},"publish_time":1374180009325,"_hasShrinkwrap":false,"_cnpm_publish_time":1374180009325,"_cnpmcore_publish_time":"2021-12-17T00:16:44.452Z"}},"readme":"# simple-assert [![Build Status](https://travis-ci.org/chaijs/simple-assert.png?branch=master)](https://travis-ci.org/chaijs/simple-assert)\n\n> Vanilla Assertions\n\nA simple `assert` wrapper around [chaijs/assertion-error](https://github.com/chaijs/assertion-error). This probably\nwon't be useful to the average user unless you are a minimalist; you probably want [Chai](https://github.com/chaijs/chai).\nWe use it to avoid circular dependencies when testing Chai's dependencies.\n\n## Installation\n\n### Node.js\n\n`simple-assert` is available on [npm](http://npmjs.org).\n\n    $ npm install simple-assert\n\n### Component\n\n`simple-assert` is available as a [component](https://github.com/component/component).\n\n    $ component install chaijs/simple-assert\n\n## Usage\n\n### assert (expr[, msg])\n\n* **@param** _{Mixed}_ expression to test for truthiness\n* **@param** _{String}_ message on failure\n\nPerform a truthy assertion.\n\n```js\nvar assert = require('simple-assert');\nassert(true, 'true is truthy');\nassert(1, '1 is truthy');\nassert('string', 'string is truthy');\n```\n\n\n### assert.not (expr[, msg])\n\n* **@param** _{Mixed}_ express to test for falsiness\n* **@param** _{String}_ messag eon failure\n\nPerform a falsey assertion.\n\n```js\ndb.get(123, function (err, doc) {\n  assert.not(err, 'db.get returned error');\n  // ...\n});\n```\n\n\n### assert.fail ([msg])\n\n* **@param** _{String}_ failure message\n\nForce an `AssertionError` to be thrown.\n\n```js\nswitch (res.statusCode) {\n  case 200:\n    // ..\n    break;\n  case 404:\n    // ..\n    break;\n  default:\n    assert.fail('Unknown response statusCode');\n}\n```\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2012 Jake Luer <jake@alogicalparadox.com> (http://alogicalparadox.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","_attachments":{},"homepage":"https://github.com/chaijs/simple-assert#readme","bugs":{"url":"https://github.com/chaijs/simple-assert/issues"},"license":"MIT"}