# transform-filter

> Filter which files your browserify transforms will affect using glob patterns

Latest version **0.1.1** (published 2015-02-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install transform-filter
pnpm add transform-filter
yarn add transform-filter
bun add transform-filter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2015-02-24 |
| First published | 2015-02-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | James Talmage |
| Maintainers | james.talmage |
| Keywords | browserify, transform, filter, include, exclude, glob, pattern |

## Links

- npm: https://www.npmjs.com/package/transform-filter
- Repository: https://github.com/jamestalmage/transform-filter
- Issues: https://github.com/jamestalmage/transform-filter/issues
- npm.io page: https://npm.io/package/transform-filter

## Dependencies (2)

- [through](https://npm.io/package/through.md) ^2.3.6
- [multimatch](https://npm.io/package/multimatch.md) ^2.0.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2015-02-24
- 0.1.0 — 2015-02-24
- 0.0.2 — 2015-02-24
- 0.0.1 — 2015-02-24

## README

transform-filter
================

  Filter [browserify](https://github.com/substack/node-browserify) transforms using glob patterns.

install
-------

```
npm install transform-filter
```

usage
-----

  suspend your disbelief for a second and pretend that [coffeeify](https://github.com/substack/coffeeify) didn't filter the files itself:

```javascript
var filterCoffee = filterTransform( coffeeify, {
  include: ['**/*.coffee'],  // only run transform on matching files
  exclude: ['**/subdir/**'], // because you don't want coffee files in `subdir` processed for some reason.
  base: '/'                  // glob patterns matched relative to this `base` (defaults to process.cwd())
});
```

  * `include` defaults to matching everything (i.e. everything is included).
  * `exclude` defaults to matching nothing (i.e. nothing is excluded).
  * You can use a `!` as the first character of any pattern to negate it

     `exclude:['tests/**','!tests/utils.js']` excludes everything in the tests directory except `utils.js`

  * Patterns can be a string, array of strings, null or undefined.
  * `base` option is computed relative to `process.cwd()`. `base:'..'` would match from the parent directory.
  Use a leading `/` for absolute urls.
  * Exclude takes precedent over include.


If you need more control than glob patterns offer, check out [filter-transform](https://www.npmjs.com/package/filter-transform).

It offers similar filtering via a user supplied callback, and sparked the idea behind this module.


licence
-------

  MIT. &copy; James Talmage

---
_Source: https://npm.io/package/transform-filter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
