# @segment/tsub

> Tsub for JS

Latest version **2.0.1** (published 2026-01-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install @segment/tsub
pnpm add @segment/tsub
yarn add @segment/tsub
bun add @segment/tsub
```

Provides the command `tsub`.

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2026-01-08 |
| First published | 2019-06-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 160.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | harksingh, fhalim-segment, cfree, ldelossantos, hjoonpm, celine-segment, pmcanseco-segment, masira, amillet89, cholt002, av-segment, aghotikar, vikrant-segment, larryatsegment, scruwys1, kyliepedersen, jinapark, cdignam-segment, segmentio, jrupasinghe, lateefat, yash-twilio, sowjanyasegment, ebru.odok, ryanligon, lpediredla, brookstaylorjr, nithan-twilio, dean-huynh, wdbetts, n2parko, jayakrishnannair, rhall-twilio, karimkeshwani, tyson_segment, jgabe13, bgamwell, poojasegment, maryam.sharif, wally.tg, salolivares, erikdw, chenxiangzhang, justeen, mericsson, prayansh-segmentt, jeremylarkin, bsneed, danieljackins, segment-seth, sayan-das-in, james9446, priscilla.giatti, nlsun, drew-thompson, segment-jsingh, mcoulibali, andrius-segment, valerieernst, nithin-benny, ainatancinco, skondamuri, clintz.seg, replatero, slenin-twilio, csayuso, seanhan-segment, nevermore2022, gilomer, marcelopv, eric.rogner, kdharaiya, jon.anderson-at-segment.com, stacy.song, rexatsegment, nickaguilar, bradenbecker, reneewang, dan.lasky, sam.tapia, lnamba, vikramkumar19, mpriyad25, jeremy.parker, smidges, nageshgolem, sudojatin, pmaid, sethsegment, jair.aviles, manali-bhosale, elmoselyee, chtoombs, peterdemartini, vincen7tran, lfdelossantos, emmy.byrne, felttrip, sa-jsooter, lluque-twilio, kevinburkesegment, afsha-nazim-seg, song4you, david.anusontarangkul.segment, jyim008, michaelghseg, aishikawaki, twjosiah, tanya.gupta.segment, sindhusegment, prabhnoor1997, chihchun-twilio, pmiller-twilio, vbatanov, simpixelated, mcullenmeyer, neeharikakondipati, eric-hyde, arunlalam-segment, mschaszberger, shuvrajit9904, abhinavsureka, varadarajan-tw, immanoj, blangtwilio, jsh-wu, sethnutetwilio, rrivera-segment, segment-admin, bgillan, tcgilbert, mckern_segment, maneesh.dharma29, joetessy, dominicbarnes, mugelstad, jalexy12, pmunin, whaider_twilio, ariel.silvestri, shraddha-twilio, michelr, brandon.scott-segment, jfehrman.segment, prayansh-twilio, dangmai-segment, aaronklish, brianhumphreystwilio, rmukundan, ashwitha.bg, ryanrouleau-segment, funlu, tdibacco, fauzy.yy, nlubchenco, arubiochavez, phillip.thomas, jkusa_segment, rollcode, meg1000, nainy.agrawal, seg-rustybailey, jbandi-twilio, saisagarkappaganthula, forgetfulfellow, pooja.patil, joe.ayoub.segment, hmohanram_seg, brian.aguirre, enyi.asonye, farhan0581, tbrennanj, parag.panda, harsh.vardhan, sshaikh_segment, xinghao.huang, shupadhyay, john.lee1100, kx-segment, segment_fan, dazu70, sai-patanjali, emilyjia, y.yu, ea_segment, yli119, pooyaj, sungju.jin, conniechen, bharath.boregowda, igracheva-twilio, benattwilio, marinhero, dobrin.ganev, alfrimpong, brandonheyer-segment, alecjacobs-segment, cjo2, yashnit-segment, dltnbrks-segment, achandrashekaran, himanshuph, pragupta, tw-dgarcia, alayvora, aparna.singhal, ynguyen, timmyzsearcy, lweimersegment, anton-vylushchak, azhaotwilio, rokatyal, kjoerres, msaraf, vikakumar, aditi.raveesh, chenchensegmentcom, sanket.mishra, odoren_segment, jxin_twilio, rcheedhalla, jbasiglio-segment, viveksainaneesegment, priyanshis, preetyp, akash.gautam07, nanotimm, yshkpr, srivig21, ssuneja, bala.singareddy, moyara2, arjunbhandage, akodankiry, rodhilton_twilio, cdelaomartinez, gbatra, spencerattick, segmentsean, sundareswar.jayakumar, vaibhavnanda, bannapple, srishti-nema, gsolis_segment, itsarijitray, bhavanki-segment, nanette.ranes, amigandhi, guthriesegment, miguelpdiaz8, mansari, sandhya16, hema-bahirwani-segment, bnakkina, praveenugiri, ighorela, nemery-segment, wlumsegment, nat-grid, needcaffeine, kbhargavaram-sg, irfan.ali.segment, ed-twilion-npm, aubreysine, sethgrid_segment, jibrang, seg-leonelsanches, smccoy-twilio, devthale, andwivedi, poojapatilseg, gaprabhu, monusegment, wongwilliam, ankit.gupta.unthinkable, harsh-joshi99, ehydesegment, caseyk09, ankigupta92, psandquist, dcp-twilio, sprajapati89, agerbas-segment, amitsinglaatseg, joy-twilio, amanda.ma, jinesh-twilio, ardev_npm, nikumar-segment-new, sarthak-twilio, nupur-twilio, vkundnani, prathoresegment, mmilhanseg, shubhkrishna, kvivekabhiram, ajsinghseg, kkolhe-twilio, prassingh, seg-ajasingh, mdkhan-tw, mahit, mfkimbell, l0aded, jay-savla, laksh25, sbommarito-segment, csmonlai, bha_segment, ayagrawal7, maygupta |

## Links

- npm: https://www.npmjs.com/package/@segment/tsub
- Repository: https://github.com/segmentio/tsub-js
- Homepage: https://github.com/segmentio/tsub-js#readme
- Issues: https://github.com/segmentio/tsub-js/issues
- npm.io page: https://npm.io/package/@segment/tsub

## Dependencies (4)

- [dlv](https://npm.io/package/dlv.md) ^1.1.3
- [dset](https://npm.io/package/dset.md) ^3.1.1
- [tiny-hashes](https://npm.io/package/tiny-hashes.md) ^1.0.1
- [@stdlib/math-base-special-ldexp](https://npm.io/package/@stdlib/math-base-special-ldexp.md) ^0.0.5

## Recent versions

- 2.0.1 (latest) — 2026-01-08
- 2.0.0 — 2023-05-30
- 1.0.1 — 2022-11-14
- 1.0.0 — 2022-11-10
- 0.2.0 — 2022-07-19
- 0.1.12 — 2022-05-16
- 0.1.11 — 2022-03-25
- 0.1.10 — 2022-01-28
- 0.1.9 — 2021-08-16
- 0.1.8 — 2021-08-16
- 0.1.7 — 2021-08-10
- 0.1.6 — 2021-08-10
- 0.1.5 — 2021-07-08
- 0.1.4 — 2021-01-06
- 0.1.3 — 2021-01-06
- … 3 more at https://npm.io/package/@segment/tsub/versions

## README

# tsub-js

> [!NOTE]
> Segment has paused maintenance on this project, but may return it to an active status in the future. Issues and pull requests from external contributors are not being considered, although internal contributions may appear from time to time. The project remains available under its open source license for anyone to use.

tsub-js is a JavaScript implementation of the [tsub filtering and
transformations engine][tsub]. This is used to support Destination Filters and
Transformations in Analytics.js destinations.

## Tests

```
% yarn install
% yarn test
```

[tsub]: https://github.com/segmentio/tsub

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