{"id":37029038,"url":"https://github.com/unassert-js/unassertify","last_synced_at":"2026-01-14T03:28:45.718Z","repository":{"id":32713019,"uuid":"36302650","full_name":"unassert-js/unassertify","owner":"unassert-js","description":"Browserify transform for unassert: Encourages programming with assertions by providing tools to compile them away.","archived":false,"fork":false,"pushed_at":"2023-01-09T08:15:15.000Z","size":655,"stargazers_count":78,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-24T19:47:34.872Z","etag":null,"topics":[],"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/unassert-js.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-26T14:47:57.000Z","updated_at":"2024-08-12T18:14:44.000Z","dependencies_parsed_at":"2023-01-14T22:00:53.194Z","dependency_job_id":null,"html_url":"https://github.com/unassert-js/unassertify","commit_stats":null,"previous_names":["twada/unassertify"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/unassert-js/unassertify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unassert-js%2Funassertify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unassert-js%2Funassertify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unassert-js%2Funassertify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unassert-js%2Funassertify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unassert-js","download_url":"https://codeload.github.com/unassert-js/unassertify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unassert-js%2Funassertify/sbom","scorecard":{"id":908856,"data":{"date":"2025-08-11","repo":{"name":"github.com/unassert-js/unassertify","commit":"8c73fe2f9269db6576525a1a901bdac0ceed534c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/node.js.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 1/18 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/unassert-js/unassertify/node.js.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/unassert-js/unassertify/node.js.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"18 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T18:23:47.835Z","repository_id":32713019,"created_at":"2025-08-24T18:23:47.835Z","updated_at":"2025-08-24T18:23:47.835Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-01-14T03:28:45.190Z","updated_at":"2026-01-14T03:28:45.695Z","avatar_url":"https://github.com/unassert-js.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"unassertify\n================================\n\n[Browserify](http://browserify.org/) transform for [unassert](https://github.com/unassert-js/unassert): Encourages [programming with assertions](https://en.wikipedia.org/wiki/Assertion_(software_development)) by providing tools to compile them away.\n\n[![unassert][unassert-banner]][unassert-url]\n\n[![Build Status][ci-image]][ci-url]\n[![NPM version][npm-image]][npm-url]\n[![Code Style][style-image]][style-url]\n[![License][license-image]][license-url]\n\n\n#### RELATED MODULES\n\n- [unassert](https://github.com/unassert-js/unassert): Encourages programming with assertions by providing tools to compile them away.\n- [babel-plugin-unassert](https://github.com/unassert-js/babel-plugin-unassert): Babel plugin for unassert\n- [webpack-unassert-loader](https://github.com/unassert-js/webpack-unassert-loader): Webpack loader for unassert\n- [gulp-unassert](https://github.com/unassert-js/gulp-unassert): Gulp plugin for unassert\n- [unassert-cli](https://github.com/unassert-js/unassert-cli): CLI for unassert\n- [rollup-plugin-unassert](https://github.com/unassert-js/rollup-plugin-unassert): RollupJS plugin for unassert\n\n\nINSTALL\n---------------------------------------\n\n```\n$ npm install --save-dev unassertify\n```\n\n\nHOW TO USE\n---------------------------------------\n\n\n### via CLI\n\n```\n$ $(npm bin)/browserify -t unassertify /path/to/src/target.js \u003e /path/to/build/target.js\n```\n\n### via API\n\n```javascript\nconst source = require('vinyl-source-stream');\nconst browserify = require('browserify');\nconst glob = require('glob'),\n\ngulp.task('production_build', function() {\n    const files = glob.sync('./src/*.js');\n    const b = browserify({entries: files});\n    b.transform('unassertify');\n    return b.bundle()\n        .pipe(source('bundle.js'))\n        .pipe(gulp.dest('./dist'));\n});\n```\n\n\nEXAMPLE\n---------------------------------------\n\nFor given `math.js` below,\n\n```javascript\n'use strict';\n\nconst assert = require('node:assert');\n\nfunction add (a, b) {\n    console.assert(typeof a === 'number');\n    assert(!isNaN(a));\n    assert.equal(typeof b, 'number');\n    assert.ok(!isNaN(b));\n    return a + b;\n}\n```\n\nRun `browserify` with `-t unassertify` to transform file.\n\n```\n$ $(npm bin)/browserify -t unassertify /path/to/demo/math.js \u003e /path/to/build/math.js\n```\n\nYou will see assert calls disappear.\n\n```javascript\n'use strict';\nfunction add(a, b) {\n    return a + b;\n}\n```\n\n\nSUPPORTED PATTERNS\n---------------------------------------\n\nAssertion expressions are removed when they match patterns below. In other words, unassertify removes assertion calls that are compatible with Node.js standard [assert](https://nodejs.org/api/assert.html) API (and `console.assert`).\n\n* `assert(value, [message])`\n* `assert.ok(value, [message])`\n* `assert.equal(actual, expected, [message])`\n* `assert.notEqual(actual, expected, [message])`\n* `assert.strictEqual(actual, expected, [message])`\n* `assert.notStrictEqual(actual, expected, [message])`\n* `assert.deepEqual(actual, expected, [message])`\n* `assert.notDeepEqual(actual, expected, [message])`\n* `assert.deepStrictEqual(actual, expected, [message])`\n* `assert.notDeepStrictEqual(actual, expected, [message])`\n* `assert.match(string, regexp[, message])`\n* `assert.doesNotMatch(string, regexp[, message])`\n* `assert.throws(block, [error], [message])`\n* `assert.doesNotThrow(block, [message])`\n* `await assert.rejects(asyncFn, [error], [message])`\n* `await assert.doesNotReject(asyncFn, [error], [message])`\n* `assert.fail([message])`\n* `assert.fail(actual, expected, message, operator)`\n* `assert.ifError(value)`\n* `console.assert(value, [message])`\n\nunassertify also removes assert variable declarations,\n\n* `import assert from \"assert\"`\n* `import assert from \"assert/strict\"`\n* `import assert from \"node:assert\"`\n* `import assert from \"node:assert/strict\"`\n* `import * as assert from \"assert\"`\n* `import * as assert from \"node:assert\"`\n* `import * as assert from \"assert/strict\"`\n* `import * as assert from \"node:assert/strict\"`\n* `import { strict as assert } from \"assert\"`\n* `import { strict as assert } from \"node:assert\"`\n* `import { default as assert } from \"assert\"`\n* `import { default as assert } from \"node:assert\"`\n* `const assert = require(\"assert\")`\n* `const assert = require(\"node:assert\")`\n* `const assert = require(\"assert/strict\")`\n* `const assert = require(\"node:assert/strict\")`\n* `const assert = require(\"assert\").strict`\n* `const assert = require(\"node:assert\").strict`\n* `const { strict: assert } = require(\"assert\")`\n* `const { strict: assert } = require(\"node:assert\")`\n\nand assignments.\n\n* `assert = require(\"assert\")`\n* `assert = require(\"node:assert\")`\n* `assert = require(\"assert/strict\")`\n* `assert = require(\"node:assert/strict\")`\n* `assert = require(\"assert\").strict`\n* `assert = require(\"node:assert\").strict`\n\n\n#### Auto Variable Tracking\n\nunassert automatically removes assertion calls based on their imported variable names.\n\nSo if import declaration is as follows,\n\n* `import strictAssert, { ok, equal as eq } from 'node:assert/strict';`\n\nunassert removes all `strictAssert`, `ok`, `eq` calls.\n\n\nAUTHOR\n---------------------------------------\n* [Takuto Wada](https://github.com/twada)\n\n\nCONTRIBUTORS\n---------------------------------------\n* [Renée Kooi](https://github.com/goto-bus-stop)\n\n\nOUR SUPPORT POLICY\n---------------------------------------\n\nWe support Node under maintenance. In other words, we stop supporting old Node version when [their maintenance ends](https://github.com/nodejs/LTS).\n\nThis means that any other environment is not supported.\n\nNOTE: If unassertify works in any of the unsupported environments, it is purely coincidental and has no bearing on future compatibility. Use at your own risk.\n\n\nLICENSE\n---------------------------------------\nLicensed under the [MIT](https://github.com/unassert-js/unassertify/blob/master/LICENSE) license.\n\n\n[unassert-url]: https://github.com/unassert-js/unassert\n[unassert-banner]: https://raw.githubusercontent.com/unassert-js/unassert-js-logo/master/banner/banner-official-fullcolor.png\n\n[npm-url]: https://npmjs.org/package/unassertify\n[npm-image]: https://badge.fury.io/js/unassertify.svg\n\n[ci-image]: https://github.com/unassert-js/unassertify/workflows/Node.js%20CI/badge.svg\n[ci-url]: https://github.com/unassert-js/unassertify/actions?query=workflow%3A%22Node.js+CI%22\n\n[license-url]: https://github.com/unassert-js/unassertify/blob/master/LICENSE\n[license-image]: https://img.shields.io/badge/license-MIT-brightgreen.svg\n\n[style-url]: https://github.com/standard/semistandard\n[style-image]: https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funassert-js%2Funassertify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funassert-js%2Funassertify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funassert-js%2Funassertify/lists"}