{"bugs":{"url":"https://github.com/browserify/commonjs-assert/issues"},"dist":{"shasum":"038ab248e4ff078e7bc2485ba6e6388466c78f76","tarball":"https://registry.npmjs.org/assert/-/assert-1.5.1.tgz","fileCount":10,"integrity":"sha512-zzw1uCAgLbsKwBfFc8CX78DDg+xZeBksSO3vwVIDDN5i94eOrPsSSyiVhmsSABFDM/OcpE2aagCat9dnWQLG1A==","signatures":[{"sig":"MEUCIE48hsqmKg+gzcIZdCFkf0sxMkDPaUqnHSBG595dcafNAiEA9nMgrzUhj/B7XZ/PeBCEGLtmw5VSszjwmGpPG4iIZvs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38565},"main":"./assert.js","name":"assert","readme":"# assert\n\n[![Build Status](https://travis-ci.org/browserify/commonjs-assert.svg?branch=master)](https://travis-ci.org/browserify/commonjs-assert)\n\nThis module is used for writing unit tests for your applications, you can access it with `require('assert')`.\n\nIt aims to be fully compatibe with the [node.js assert module](http://nodejs.org/api/assert.html), same API and same behavior, just adding support for web browsers.\nThe API and code may contain traces of the [CommonJS Unit Testing 1.0 spec](http://wiki.commonjs.org/wiki/Unit_Testing/1.0) which they were based on, but both have evolved significantly since then.\n\nA `strict` and a `legacy` mode exist, while it is recommended to only use `strict mode`.\n\n## Strict mode\n\nWhen using the `strict mode`, any `assert` function will use the equality used in the strict function mode. So `assert.deepEqual()` will, for example, work the same as `assert.deepStrictEqual()`.\n\nIt can be accessed using:\n\n```js\nconst assert = require('assert').strict;\n```\n\n## Legacy mode\n\n> Deprecated: Use strict mode instead.\n\nWhen accessing `assert` directly instead of using the `strict` property, the\n[Abstract Equality Comparison](https://tc39.github.io/ecma262/#sec-abstract-equality-comparison) will be used for any function without a\n\"strict\" in its name (e.g. `assert.deepEqual()`).\n\nIt can be accessed using:\n\n```js\nconst assert = require('assert');\n```\n\nIt is recommended to use the `strict mode` instead as the Abstract Equality Comparison can often have surprising results. Especially\nin case of `assert.deepEqual()` as the used comparison rules there are very lax.\n\nE.g.\n\n```js\n// WARNING: This does not throw an AssertionError!\nassert.deepEqual(/a/gi, new Date());\n```\n\n\n## assert.fail(actual, expected, message, operator)\nThrows an exception that displays the values for actual and expected separated by the provided operator.\n\n## assert(value, message), assert.ok(value, [message])\nTests if value is truthy, it is equivalent to assert.equal(true, !!value, message);\n\n## assert.equal(actual, expected, [message])\nTests shallow, coercive equality with the equal comparison operator ( == ).\n\n## assert.notEqual(actual, expected, [message])\nTests shallow, coercive non-equality with the not equal comparison operator ( != ).\n\n## assert.deepEqual(actual, expected, [message])\nTests for deep equality.\n\n## assert.deepStrictEqual(actual, expected, [message])\nTests for deep equality, as determined by the strict equality operator ( === )\n\n## assert.notDeepEqual(actual, expected, [message])\nTests for any deep inequality.\n\n## assert.strictEqual(actual, expected, [message])\nTests strict equality, as determined by the strict equality operator ( === )\n\n## assert.notStrictEqual(actual, expected, [message])\nTests strict non-equality, as determined by the strict not equal operator ( !== )\n\n## assert.throws(block, [error], [message])\nExpects block to throw an error. error can be constructor, regexp or validation function.\n\nValidate instanceof using constructor:\n\n```javascript\nassert.throws(function() { throw new Error(\"Wrong value\"); }, Error);\n```\n\nValidate error message using RegExp:\n\n```javascript\nassert.throws(function() { throw new Error(\"Wrong value\"); }, /value/);\n```\n\nCustom error validation:\n\n```javascript\nassert.throws(function() {\n    throw new Error(\"Wrong value\");\n}, function(err) {\n    if ( (err instanceof Error) && /value/.test(err) ) {\n        return true;\n    }\n}, \"unexpected error\");\n```\n\n## assert.doesNotThrow(block, [message])\nExpects block not to throw an error, see assert.throws for details.\n\n## assert.ifError(value)\nTests if value is not a false value, throws if it is a true value. Useful when testing the first argument, error in callbacks.\n","gitHead":"b7a14af96466565ad52ed6b05ced918bd298f2e3","license":"MIT","scripts":{"test":"npm run test-node && npm run test-browser","test-node":"mocha --ui qunit test.js","test-native":"TEST_NATIVE=true mocha --ui qunit test.js","test-browser":"zuul -- test.js","browser-local":"zuul --no-coverage --local 8000 -- test.js"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"homepage":"https://github.com/browserify/commonjs-assert","keywords":["assert","browser"],"repository":{"url":"git://github.com/browserify/commonjs-assert.git","type":"git"},"_npmVersion":"9.8.1","description":"The node.js assert module, re-packaged for web browsers.","directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"},{"name":"goto-bus-stop","email":"npm@asdf.kooi.me"},{"name":"lukechilds","email":"lukechilds123@gmail.com"},{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"coolaj86","email":"coolaj86@gmail.com"},{"name":"defunctzombie","email":"shtylman@gmail.com"}],"_nodeVersion":"20.6.0","dependencies":{"util":"^0.10.4","object.assign":"^4.1.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"zuul":"~3.10.0","mocha":"~1.21.4","zuul-ngrok":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/assert_1.5.1_1694111384895_0.5104041084794244","host":"s3://npm-registry-packages"},"_id":"assert@1.5.1","version":"1.5.1"}