{"id":15395030,"url":"https://github.com/goto-bus-stop/mini-unassert","last_synced_at":"2025-07-04T18:09:20.288Z","repository":{"id":57297684,"uuid":"138477104","full_name":"goto-bus-stop/mini-unassert","owner":"goto-bus-stop","description":"remove assert calls from a stream of javascript","archived":false,"fork":false,"pushed_at":"2018-06-29T12:05:21.000Z","size":12,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T23:56:37.335Z","etag":null,"topics":["assert","browserify","browserify-transform","optimization","production","transform","unassert"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goto-bus-stop.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-24T11:40:51.000Z","updated_at":"2024-10-10T23:30:24.000Z","dependencies_parsed_at":"2022-09-01T08:40:55.648Z","dependency_job_id":null,"html_url":"https://github.com/goto-bus-stop/mini-unassert","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/goto-bus-stop/mini-unassert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Fmini-unassert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Fmini-unassert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Fmini-unassert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Fmini-unassert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goto-bus-stop","download_url":"https://codeload.github.com/goto-bus-stop/mini-unassert/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Fmini-unassert/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263594621,"owners_count":23485877,"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","browserify","browserify-transform","optimization","production","transform","unassert"],"created_at":"2024-10-01T15:25:25.415Z","updated_at":"2025-07-04T18:09:20.266Z","avatar_url":"https://github.com/goto-bus-stop.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mini-unassert\n\na small and fast unassert transform\n\n[![npm][npm-image]][npm-url]\n[![travis][travis-image]][travis-url]\n[![standard][standard-image]][standard-url]\n\nIt transforms `assert` calls to `void` expressions. Use a minifier like [terser](https://github.com/fabiosantoscode/terser) to completely remove them.\n\nInput:\n\n```js\nvar assert = require('assert')\nassert(true)\nassert.equal(typeof x, 'string')\nassert(sideEffectCall())\nassert.throws(function () {})\n```\n\nOutput:\n\n```js\n;\nvoid (true)\nvoid (typeof x, 'string')\nvoid (sideEffectCall())\nvoid (function () {})\n```\n\nAfter minification:\n\n```js\nsideEffectCall();\n```\n\n[npm-image]: https://img.shields.io/npm/v/mini-unassert.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/mini-unassert\n[travis-image]: https://img.shields.io/travis/goto-bus-stop/mini-unassert.svg?style=flat-square\n[travis-url]: https://travis-ci.org/goto-bus-stop/mini-unassert\n[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[standard-url]: http://npm.im/standard\n\n## Install\n\n```\nnpm install mini-unassert\n```\n\n## Usage\n\nIt works as a stream and as a browserify transform.\n\n```js\nvar unassert = require('mini-unassert')\nfs.createReadStream('file.js')\n  .pipe(unassert({ modules: ['assert', 'power-assert', 'nanoassert'] }))\n  .pipe(fs.createWriteStream('file.unassert.js'))\n```\n\n```js\nbrowserify -g mini-unassert -g uglifyify\n```\n\n## API\n\n### `stream = unassert(opts={})`\n\nCreate a stream that replaces assert calls with `void` expressions.\n\n* `opts.modules` is an array of assertion module names, defaulting to `['assert']`.\n\n### `b.transform(unassert, opts={})`\n\nAdd `unassert` as a browserify transform. `b` is an instance of browserify.\n\n* Set `opts.global` to run it on all files, including dependencies in node_modules. (recommended)\n* `opts.modules` is an array of assertion module names, defaulting to `['assert']`.\n\n## License\n\n[Apache-2.0](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoto-bus-stop%2Fmini-unassert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoto-bus-stop%2Fmini-unassert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoto-bus-stop%2Fmini-unassert/lists"}