{"id":20780190,"url":"https://github.com/xotic750/assert-x","last_synced_at":"2025-10-12T21:54:03.668Z","repository":{"id":12656018,"uuid":"15327766","full_name":"Xotic750/assert-x","owner":"Xotic750","description":"A Javascript assertion library.","archived":false,"fork":false,"pushed_at":"2023-07-03T16:14:28.000Z","size":7765,"stargazers_count":2,"open_issues_count":23,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-30T20:31:52.534Z","etag":null,"topics":["assert","browser","ecmascript","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xotic750.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-12-20T02:08:05.000Z","updated_at":"2020-01-31T11:50:16.000Z","dependencies_parsed_at":"2024-11-18T00:31:28.400Z","dependency_job_id":null,"html_url":"https://github.com/Xotic750/assert-x","commit_stats":{"total_commits":212,"total_committers":2,"mean_commits":106.0,"dds":"0.061320754716981174","last_synced_commit":"d79b028e92cc84fd8fc1a9683346141e10c18ab7"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xotic750%2Fassert-x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xotic750%2Fassert-x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xotic750%2Fassert-x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xotic750%2Fassert-x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xotic750","download_url":"https://codeload.github.com/Xotic750/assert-x/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251777794,"owners_count":21642227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assert","browser","ecmascript","nodejs"],"created_at":"2024-11-17T13:32:44.956Z","updated_at":"2025-10-12T21:53:58.636Z","avatar_url":"https://github.com/Xotic750.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca\n  href=\"https://travis-ci.org/Xotic750/assert-x\"\n  title=\"Travis status\"\u003e\n\u003cimg\n  src=\"https://travis-ci.org/Xotic750/assert-x.svg?branch=master\"\n  alt=\"Travis status\" height=\"18\"\u003e\n\u003c/a\u003e\n\u003ca\n  href=\"https://david-dm.org/Xotic750/assert-x\"\n  title=\"Dependency status\"\u003e\n\u003cimg src=\"https://david-dm.org/Xotic750/assert-x/status.svg\"\n  alt=\"Dependency status\" height=\"18\"/\u003e\n\u003c/a\u003e\n\u003ca\n  href=\"https://david-dm.org/Xotic750/assert-x?type=dev\"\n  title=\"devDependency status\"\u003e\n\u003cimg src=\"https://david-dm.org/Xotic750/assert-x/dev-status.svg\"\n  alt=\"devDependency status\" height=\"18\"/\u003e\n\u003c/a\u003e\n\u003ca\n  href=\"https://badge.fury.io/js/assert-x\"\n  title=\"npm version\"\u003e\n\u003cimg src=\"https://badge.fury.io/js/assert-x.svg\"\n  alt=\"npm version\" height=\"18\"\u003e\n\u003c/a\u003e\n\u003ca\n  href=\"https://www.jsdelivr.com/package/npm/assert-x\"\n  title=\"jsDelivr hits\"\u003e\n\u003cimg src=\"https://data.jsdelivr.com/v1/package/npm/assert-x/badge?style=rounded\"\n  alt=\"jsDelivr hits\" height=\"18\"\u003e\n\u003c/a\u003e\n\u003ca\n  href=\"https://bettercodehub.com/results/Xotic750/assert-x\"\n  title=\"bettercodehub score\"\u003e\n\u003cimg src=\"https://bettercodehub.com/edge/badge/Xotic750/assert-x?branch=master\"\n  alt=\"bettercodehub score\" height=\"18\"\u003e\n\u003c/a\u003e\n\u003ca\n  href=\"https://coveralls.io/github/Xotic750/assert-x?branch=master\"\n  title=\"Coverage Status\"\u003e\n\u003cimg src=\"https://coveralls.io/repos/github/Xotic750/assert-x/badge.svg?branch=master\"\n  alt=\"Coverage Status\" height=\"18\"\u003e\n\u003c/a\u003e\n\n\u003ca name=\"module_assert-x\"\u003e\u003c/a\u003e\n\n## assert-x\n\nA Javascript assertion library.\n\n**See**: https://nodejs.org/dist/latest-v12.x/docs/api/assert.html\n\nThis is legacy mode by default.\n\n**See**:https://nodejs.org/dist/latest-v12.x/docs/api/assert.html#assert_legacy_mode\n\n- [assert-x](#module_assert-x)\n  - [~AssertionError](#module_assert-x.AssertionError) ⇐ \u003ccode\u003eError\u003c/code\u003e\n    - [`new AssertionError([message])`](#new_module_assert-x.AssertionError_new)\n  - [`~deepEqual`](#module_assert-x.deepEqual)\n  - [`~deepStrictEqual`](#module_assert-x.deepStrictEqual)\n  - [`~doesNotThrow`](#module_assert-x.doesNotThrow)\n  - [`~equal`](#module_assert-x.equal)\n  - [`~fail`](#module_assert-x.fail)\n  - [`~ifError`](#module_assert-x.ifError)\n  - [`~notDeepEqual`](#module_assert-x.notDeepEqual)\n  - [`~notDeepStrictEqual`](#module_assert-x.notDeepStrictEqual)\n  - [`~notEqual`](#module_assert-x.notEqual)\n  - [`~notStrictEqual`](#module_assert-x.notStrictEqual)\n  - [`~ok`](#module_assert-x.ok)\n  - [`~strictEqual`](#module_assert-x.strictEqual)\n  - [`~throws`](#module_assert-x.throws)\n  - [`~$assert(value, message)`](#module_assert-x.$assert)\n\nStrict mode is available.\n\n**See**: https://nodejs.org/dist/latest-v12.x/docs/api/assert.html#assert_strict_mode\n\n\u003ca name=\"module_assert-x.AssertionError\"\u003e\u003c/a\u003e\n\n### assert-x~AssertionError ⇐ \u003ccode\u003eError\u003c/code\u003e\n\n**Kind**: inner class of [\u003ccode\u003eassert-x\u003c/code\u003e](#module_assert-x)  \n**Extends**: \u003ccode\u003eError\u003c/code\u003e  \n\u003ca name=\"new_module_assert-x.AssertionError_new\"\u003e\u003c/a\u003e\n\n#### `new AssertionError([message])`\n\nError constructor for test and validation frameworks that implement the\nstandardized AssertionError specification.\n\n| Param     | Type                | Description                      |\n| --------- | ------------------- | -------------------------------- |\n| [message] | \u003ccode\u003eObject\u003c/code\u003e | Need to document the properties. |\n\n\u003ca name=\"module_assert-x.deepEqual\"\u003e\u003c/a\u003e\n\n### `assert-x~deepEqual`\n\nTests for deep equality, coercive equality with the equal comparison\noperator ( == ) and equivalent.\n\n**Kind**: inner property of [\u003ccode\u003eassert-x\u003c/code\u003e](#module_assert-x)\n\n| Param     | Type                | Description                                   |\n| --------- | ------------------- | --------------------------------------------- |\n| actual    | \u003ccode\u003e\\*\u003c/code\u003e     | The actual value to be tested.                |\n| expected  | \u003ccode\u003e\\*\u003c/code\u003e     | The expected value to compare against actual. |\n| [message] | \u003ccode\u003estring\u003c/code\u003e | Text description of test.                     |\n\n\u003ca name=\"module_assert-x.deepStrictEqual\"\u003e\u003c/a\u003e\n\n### `assert-x~deepStrictEqual`\n\nTests for deep equality, coercive equality with the equal comparison\noperator ( === ) and equivalent.\n\n**Kind**: inner property of [\u003ccode\u003eassert-x\u003c/code\u003e](#module_assert-x)\n\n| Param     | Type                | Description                                   |\n| --------- | ------------------- | --------------------------------------------- |\n| actual    | \u003ccode\u003e\\*\u003c/code\u003e     | The actual value to be tested.                |\n| expected  | \u003ccode\u003e\\*\u003c/code\u003e     | The expected value to compare against actual. |\n| [message] | \u003ccode\u003estring\u003c/code\u003e | Text description of test.                     |\n\n\u003ca name=\"module_assert-x.doesNotThrow\"\u003e\u003c/a\u003e\n\n### `assert-x~doesNotThrow`\n\nExpects block not to throw an error, see assert~throws for details.\n\n**Kind**: inner property of [\u003ccode\u003eassert-x\u003c/code\u003e](#module_assert-x)\n\n| Param     | Type                     | Description                                   |\n| --------- | ------------------------ | --------------------------------------------- |\n| block     | \u003ccode\u003efunction\u003c/code\u003e    | The function block to be executed in testing. |\n| [error]   | \u003ccode\u003econstructor\u003c/code\u003e | The comparator.                               |\n| [message] | \u003ccode\u003estring\u003c/code\u003e      | Text description of test.                     |\n\n\u003ca name=\"module_assert-x.equal\"\u003e\u003c/a\u003e\n\n### `assert-x~equal`\n\nTests shallow, coercive equality with the equal comparison\noperator ( == ).\n\n**Kind**: inner property of [\u003ccode\u003eassert-x\u003c/code\u003e](#module_assert-x)\n\n| Param     | Type                | Description                                   |\n| --------- | ------------------- | --------------------------------------------- |\n| actual    | \u003ccode\u003e\\*\u003c/code\u003e     | The actual value to be tested.                |\n| expected  | \u003ccode\u003e\\*\u003c/code\u003e     | The expected value to compare against actual. |\n| [message] | \u003ccode\u003estring\u003c/code\u003e | Text description of test.                     |\n\n\u003ca name=\"module_assert-x.fail\"\u003e\u003c/a\u003e\n\n### `assert-x~fail`\n\nThrows an exception that displays the values for actual and expected\nseparated by the provided operator.\n\n**Kind**: inner property of [\u003ccode\u003eassert-x\u003c/code\u003e](#module_assert-x)  \n**Throws**:\n\n- \u003ccode\u003eError\u003c/code\u003e Throws an `AssertionError`.\n\n| Param     | Type                | Description                                   |\n| --------- | ------------------- | --------------------------------------------- |\n| actual    | \u003ccode\u003e\\*\u003c/code\u003e     | The actual value to be tested.                |\n| expected  | \u003ccode\u003e\\*\u003c/code\u003e     | The expected value to compare against actual. |\n| [message] | \u003ccode\u003estring\u003c/code\u003e | Text description of test.                     |\n| operator  | \u003ccode\u003estring\u003c/code\u003e | The compare operator.                         |\n\n\u003ca name=\"module_assert-x.ifError\"\u003e\u003c/a\u003e\n\n### `assert-x~ifError`\n\nTests if value is not a falsy value, throws if it is a truthy value.\nUseful when testing the first argument, error in callbacks.\n\n**Kind**: inner property of [\u003ccode\u003eassert-x\u003c/code\u003e](#module_assert-x)  \n**Throws**:\n\n- \u003ccode\u003e\\*\u003c/code\u003e The value `err` if truthy.\n\n| Param | Type            | Description                            |\n| ----- | --------------- | -------------------------------------- |\n| err   | \u003ccode\u003e\\*\u003c/code\u003e | The value to be tested for truthiness. |\n\n\u003ca name=\"module_assert-x.notDeepEqual\"\u003e\u003c/a\u003e\n\n### `assert-x~notDeepEqual`\n\nTests for any deep inequality. Opposite of `deepEqual`.\n\n**Kind**: inner property of [\u003ccode\u003eassert-x\u003c/code\u003e](#module_assert-x)\n\n| Param     | Type                | Description                                   |\n| --------- | ------------------- | --------------------------------------------- |\n| actual    | \u003ccode\u003e\\*\u003c/code\u003e     | The actual value to be tested.                |\n| expected  | \u003ccode\u003e\\*\u003c/code\u003e     | The expected value to compare against actual. |\n| [message] | \u003ccode\u003estring\u003c/code\u003e | Text description of test.                     |\n\n\u003ca name=\"module_assert-x.notDeepStrictEqual\"\u003e\u003c/a\u003e\n\n### `assert-x~notDeepStrictEqual`\n\nTests for deep inequality. Opposite of `deepStrictEqual`.\n\n**Kind**: inner property of [\u003ccode\u003eassert-x\u003c/code\u003e](#module_assert-x)\n\n| Param     | Type                | Description                                   |\n| --------- | ------------------- | --------------------------------------------- |\n| actual    | \u003ccode\u003e\\*\u003c/code\u003e     | The actual value to be tested.                |\n| expected  | \u003ccode\u003e\\*\u003c/code\u003e     | The expected value to compare against actual. |\n| [message] | \u003ccode\u003estring\u003c/code\u003e | Text description of test.                     |\n\n\u003ca name=\"module_assert-x.notEqual\"\u003e\u003c/a\u003e\n\n### `assert-x~notEqual`\n\nTests shallow, coercive non-equality with the not equal comparison\noperator ( != ).\n\n**Kind**: inner property of [\u003ccode\u003eassert-x\u003c/code\u003e](#module_assert-x)\n\n| Param     | Type                | Description                                   |\n| --------- | ------------------- | --------------------------------------------- |\n| actual    | \u003ccode\u003e\\*\u003c/code\u003e     | The actual value to be tested.                |\n| expected  | \u003ccode\u003e\\*\u003c/code\u003e     | The expected value to compare against actual. |\n| [message] | \u003ccode\u003estring\u003c/code\u003e | Text description of test.                     |\n\n\u003ca name=\"module_assert-x.notStrictEqual\"\u003e\u003c/a\u003e\n\n### `assert-x~notStrictEqual`\n\nTests strict non-equality, as determined by the strict not equal\noperator ( !== ).\n\n**Kind**: inner property of [\u003ccode\u003eassert-x\u003c/code\u003e](#module_assert-x)\n\n| Param     | Type                | Description                                   |\n| --------- | ------------------- | --------------------------------------------- |\n| actual    | \u003ccode\u003e\\*\u003c/code\u003e     | The actual value to be tested.                |\n| expected  | \u003ccode\u003e\\*\u003c/code\u003e     | The expected value to compare against actual. |\n| [message] | \u003ccode\u003estring\u003c/code\u003e | Text description of test.                     |\n\n\u003ca name=\"module_assert-x.ok\"\u003e\u003c/a\u003e\n\n### `assert-x~ok`\n\nTests if value is truthy, it is equivalent to\n`equal(!!value, true, message)`.\n\n**Kind**: inner property of [\u003ccode\u003eassert-x\u003c/code\u003e](#module_assert-x)\n\n| Param     | Type                | Description               |\n| --------- | ------------------- | ------------------------- |\n| value     | \u003ccode\u003e\\*\u003c/code\u003e     | The value to be tested.   |\n| [message] | \u003ccode\u003estring\u003c/code\u003e | Text description of test. |\n\n\u003ca name=\"module_assert-x.strictEqual\"\u003e\u003c/a\u003e\n\n### `assert-x~strictEqual`\n\nTests strict equality, as determined by the strict equality\noperator ( === ).\n\n**Kind**: inner property of [\u003ccode\u003eassert-x\u003c/code\u003e](#module_assert-x)\n\n| Param     | Type                | Description                                   |\n| --------- | ------------------- | --------------------------------------------- |\n| actual    | \u003ccode\u003e\\*\u003c/code\u003e     | The actual value to be tested.                |\n| expected  | \u003ccode\u003e\\*\u003c/code\u003e     | The expected value to compare against actual. |\n| [message] | \u003ccode\u003estring\u003c/code\u003e | Text description of test.                     |\n\n\u003ca name=\"module_assert-x.throws\"\u003e\u003c/a\u003e\n\n### `assert-x~throws`\n\nExpects block to throw an error. `error` can be constructor, regexp or\nvalidation function.\n\n**Kind**: inner property of [\u003ccode\u003eassert-x\u003c/code\u003e](#module_assert-x)\n\n| Param     | Type                                                                     | Description                                   |\n| --------- | ------------------------------------------------------------------------ | --------------------------------------------- |\n| block     | \u003ccode\u003efunction\u003c/code\u003e                                                    | The function block to be executed in testing. |\n| [error]   | \u003ccode\u003econstructor\u003c/code\u003e \\| \u003ccode\u003eRegExp\u003c/code\u003e \\| \u003ccode\u003efunction\u003c/code\u003e | The comparator.                               |\n| [message] | \u003ccode\u003estring\u003c/code\u003e                                                      | Text description of test.                     |\n\n\u003ca name=\"module_assert-x.$assert\"\u003e\u003c/a\u003e\n\n### `assert-x~$assert(value, message)`\n\nTests if value is truthy, it is equivalent to `equal(!!value, true, message)`.\n\n**Kind**: inner method of [\u003ccode\u003eassert-x\u003c/code\u003e](#module_assert-x)\n\n| Param   | Type                | Description               |\n| ------- | ------------------- | ------------------------- |\n| value   | \u003ccode\u003e\\*\u003c/code\u003e     | The value to be tested.   |\n| message | \u003ccode\u003estring\u003c/code\u003e | Text description of test. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxotic750%2Fassert-x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxotic750%2Fassert-x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxotic750%2Fassert-x/lists"}