{"id":15395020,"url":"https://github.com/goto-bus-stop/tfilter","last_synced_at":"2025-06-12T21:08:11.030Z","repository":{"id":27338347,"uuid":"113498521","full_name":"goto-bus-stop/tfilter","owner":"goto-bus-stop","description":"selectively run browserify transforms using globs or a filter function","archived":false,"fork":false,"pushed_at":"2024-12-30T14:05:44.000Z","size":27,"stargazers_count":17,"open_issues_count":5,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T03:06:06.218Z","etag":null,"topics":["browserify","filter","transform"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/tfilter","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":"2017-12-07T21:06:08.000Z","updated_at":"2024-12-30T13:45:36.000Z","dependencies_parsed_at":"2023-02-12T20:15:49.192Z","dependency_job_id":null,"html_url":"https://github.com/goto-bus-stop/tfilter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Ftfilter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Ftfilter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Ftfilter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Ftfilter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goto-bus-stop","download_url":"https://codeload.github.com/goto-bus-stop/tfilter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249173061,"owners_count":21224481,"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":["browserify","filter","transform"],"created_at":"2024-10-01T15:25:23.132Z","updated_at":"2025-04-15T23:54:09.486Z","avatar_url":"https://github.com/goto-bus-stop.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tfilter\n\nselectively run browserify transforms using globs or a filter function\n\nit is different from most other transform filter packages in that this can be used simply from the CLI.\n\n[![npm][npm-image]][npm-url]\n[![travis][travis-image]][travis-url]\n[![standard][standard-image]][standard-url]\n\n[npm-image]: https://img.shields.io/npm/v/tfilter.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/tfilter\n[travis-image]: https://img.shields.io/travis/goto-bus-stop/tfilter.svg?style=flat-square\n[travis-url]: https://travis-ci.org/goto-bus-stop/tfilter\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 tfilter\n```\n\n## Usage\n\n```\nbrowserify -t [ tfilter --include '*.js' brfs ]\nbrowserify -t [ tfilter --exclude '**/*.json' envify --NODE_ENV production ]\n```\n\n```js\nbrowserify()\n  .transform(tfilter(brfs, { include: '*.js' }), { /* options for brfs */ })\n  .transform(tfilter(envify, { exclude: /\\.json$/ }), { NODE_ENV: 'production' })\n  .transform(tfilter(uppercaseify, { filter: function () { return Math.random() \u003c 0.5 } }))\n```\n\n### `--include`\n\nFiles matching this glob will be transformed. Other files will not be.\n\n### `--exclude`\n\nFiles matching this glob will not be transformed. Other files will be.\n\nUsing both `--include` and `--exclude` means both conditions apply: A file path must match the `--include` glob **and** must **not** match the `--exclude` glob in order to be transformed.\n\n## Node API\n\nCall `tfilter` with a transform function in the first parameter, and options in the second parameter.\n`tfilter(transform, opts)` will return a new transform function that can be passed to browserify.\n\n```js\nvar babelify = require('babelify')\nvar tfilter = require('tfilter')\n\nb.transform(\n  tfilter(babelify, { include: /\\.mjs$/ }),\n  { plugins: 'transform-es2015-modules-commonjs' }\n)\n```\n\n### `include: '' or /./`\n\nFiles matching this glob or Regex will be transformed.\n\n### `exclude: '' or /./`\n\nFiles matching this glob or Regex will not be transformed.\n\n### `filter: function (filename) {}`\n\nCheck if `filename` should be transformed, with some custom logic. If given, `include` and `exclude` are not considered.\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%2Ftfilter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoto-bus-stop%2Ftfilter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoto-bus-stop%2Ftfilter/lists"}