{"_id":"commonjs-assert","name":"commonjs-assert","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.3":{"author":{"name":"Sultan Wan"},"name":"commonjs-assert","version":"1.0.3","description":"TDD assertion library for node.js and the browser. Test framework agnostic.","keywords":["test","assertion","assert","testing","chai","commonjs-assert"],"homepage":"http://commonjs-assert.com","license":"MIT","contributors":[{"name":"Sultan Wan"},{"name":"John Firebaugh","email":"john.firebaugh@gmail.com"}],"main":"./index","exports":{".":{"require":"./index.js","import":"./index.mjs"},"./*":"./*"},"scripts":{"test":"make test"},"engines":{"node":">=4"},"dependencies":{"assertion-error":"^1.1.0","axios":"^1.13.2","check-error":"^1.0.3","deep-eql":"^4.1.3","get-func-name":"^2.0.2","loupe":"^2.3.6","pathval":"^1.1.1","type-detect":"^4.1.0"},"devDependencies":{"browserify":"^16.5.2","bump-cli":"^2.7.1","codecov":"^3.8.3","istanbul":"^0.4.5","karma":"^6.4.2","karma-chrome-launcher":"^2.2.0","karma-firefox-launcher":"^1.3.0","karma-mocha":"^2.0.1","karma-sauce-launcher":"^4.1.4","mocha":"^10.2.0"},"_id":"commonjs-assert@1.0.3","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-Vw7ZDOoyqzsft/bFOl46g24DrY5xa6ict3PLLv8J3vavETHiMdQkgoiLCGs168FtW5Y5kTF0rJnan+5xUZpecg==","shasum":"c3a0c5e2a5a32a05c078f4e03dfb920f64e8a53c","tarball":"https://registry.npmjs.org/commonjs-assert/-/commonjs-assert-1.0.3.tgz","fileCount":51,"unpackedSize":743484,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA6PK4/wL2T3frbEgOoeC/msANuZpL8vW9A/QYl/owQCAiEAqtq2SyEj5bsp4y+1pT+EWwSmQYUGtMbVNfQx+4pwyFw="}]},"_npmUser":{"name":"absolute268","email":"top89268@gmail.com"},"directories":{},"maintainers":[{"name":"absolute268","email":"top89268@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/commonjs-assert_1.0.3_1784107301616_0.5109653881799725"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-15T09:21:41.432Z","1.0.3":"2026-07-15T09:21:41.814Z","modified":"2026-07-15T09:21:41.981Z"},"maintainers":[{"name":"absolute268","email":"top89268@gmail.com"}],"description":"TDD assertion library for node.js and the browser. Test framework agnostic.","homepage":"http://commonjs-assert.com","keywords":["test","assertion","assert","testing","chai","commonjs-assert"],"contributors":[{"name":"Sultan Wan"},{"name":"John Firebaugh","email":"john.firebaugh@gmail.com"}],"author":{"name":"Sultan Wan"},"license":"MIT","readme":"<h1 align=center>\n  Commonjs-assert\n</h1>\n\n<p align=center>\n  Commonjs-assert is a BDD / TDD assertion library for <a href=\"http://nodejs.org\">node</a> and the browser that can be delightfully paired with any javascript testing framework.\n</p>\n\n## What is Commonjs-assert?\n\nCommonjs-assert is an _assertion library_, similar to Node's built-in `assert`. It makes testing much easier by giving you lots of assertions you can run against your code.\n\n## Installation\n\n### Node.js\n\n`commonjs-assert` is available on [npm](http://npmjs.org). To install it, type:\n\n    $ npm install --save-dev commonjs-assert\n\n### Browsers\n\nYou can also use it within the browser; install via npm and use the `commonjs-assert.js` file found within the download. For example:\n\n```html\n<script src=\"./node_modules/commonjs-assert/assert.js\"></script>\n```\n\n## Usage\n\nImport the library in your code, and then pick one of the styles you'd like to use - either `assert`, `expect` or `should`:\n\n```js\nvar assert_utils = require('commonjs-assert');  \nvar assert = assert_utils.assert;    // Using Assert style\nvar expect = assert_utils.expect;    // Using Expect style\nvar should = assert_utils.should();  // Using Should style\n```\n\n### Pre-Native Modules Usage (_registers the assert_utils testing style globally_)\n\n```js\nrequire('commonjs-assert/register-assert');  // Using Assert style\nrequire('commonjs-assert/register-expect');  // Using Expect style\nrequire('commonjs-assert/register-should');  // Using Should style\n```\n\n### Pre-Native Modules Usage (_as local variables_)\n\n```js\nconst { assert } = require('commonjs-assert');  // Using Assert style\nconst { expect } = require('commonjs-assert');  // Using Expect style\nconst { should } = require('commonjs-assert');  // Using Should style\nshould();  // Modifies `Object.prototype`\n\nconst { expect, use } = require('commonjs-assert');  // Creates local variables `expect` and `use`; useful for plugin use\n```\n\n### Native Modules Usage (_registers the chai testing style globally_)\n\n```js\nimport 'commonjs-assert/register-assert';  // Using Assert style\nimport 'commonjs-assert/register-expect';  // Using Expect style\nimport 'commonjs-assert/register-should';  // Using Should style\n```\n\n### Native Modules Usage (_local import only_)\n\n```js\nimport { assert } from 'commonjs-assert';  // Using Assert style\nimport { expect } from 'commonjs-assert';  // Using Expect style\nimport { should } from 'commonjs-assert';  // Using Should style\nshould();  // Modifies `Object.prototype`\n```\n\n\n[Read more about these styles in our docs](http://commonjs-assert.com/guide/styles/).\n\n## Plugins\n\nCommonJs Assert offers a robust Plugin architecture for extending assertions and interfaces.\n\n- Need a plugin? View the [official plugin list](http://commonjs-assert.com/plugins).\n- Want to build a plugin? Read the [plugin api documentation](http://commonjs-assert.com/guide/plugins/).\n- Have a plugin and want it listed? Simply add the following keywords to your package.json:\n  -  `browser` if your plugin works in the browser as well as Node.js\n  -  `browser-only` if your plugin does not work with Node.js\n\n### Contributing\n\nThank you very much for considering to contribute!\n\nPlease make sure you follow our [Code Of Conduct](https://github.com/commonjs-assert/commonjs-assert/blob/master/CODE_OF_CONDUCT.md) and we also strongly recommend reading our [Contributing Guide](https://github.com/commonjs-assert/commonjs-assert/blob/master/CONTRIBUTING.md).\n\nHere are a few issues other contributors frequently ran into when opening pull requests:\n\n- Please do not commit changes to the `chai.js` build. We do it once per release.\n- Before pushing your commits, please make sure you [rebase](https://github.com/commonjs-assert/blob/master/CONTRIBUTING.md#pull-requests) them.\n\n### Contributors\n\nPlease see the full\n[Contributors Graph](https://github.com/commonjs-assert/graphs/contributors) for our\nlist of contributors.","readmeFilename":"README.md","_rev":"1-dc9a5b997f554c9633333d1f89615943"}