# tinyest

> A compact, fast, and embeddable JavaScript AST for transpilation.

Latest version **0.3.4** (published 2026-09-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install tinyest
pnpm add tinyest
yarn add tinyest
bun add tinyest
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.3.4 |
| Published | 2026-09-25 |
| First published | 2024-11-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=12.20.0 |
| Dependencies | 0 |
| Unpacked size | 26.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| Maintainers | iwoplaza, swm-bot |
| Keywords | ast, javascript |

## Links

- npm: https://www.npmjs.com/package/tinyest
- Repository: https://github.com/software-mansion/TypeGPU
- Homepage: https://docs.swmansion.com/TypeGPU
- Issues: https://github.com/software-mansion/TypeGPU/issues
- npm.io page: https://npm.io/package/tinyest

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 0.3.4 (latest) — 2026-09-25
- 0.1.0-alpha.7 (alpha) — 2025-04-04
- 0.3.3 — 2026-08-28
- 0.3.2 — 2026-05-28
- 0.3.1 — 2026-03-11
- 0.3.0 — 2026-02-24
- 0.2.0 — 2025-12-22
- 0.1.2 — 2025-10-30
- 0.1.1 — 2025-05-27
- 0.1.0 — 2025-04-22
- 0.1.0-alpha.6 — 2025-03-24
- 0.1.0-alpha.5 — 2025-03-17
- 0.1.0-alpha.4 — 2025-03-10
- 0.1.0-alpha.3 — 2025-02-17
- 0.1.0-alpha.2 — 2025-02-12
- … 3 more at https://npm.io/package/tinyest/versions

## README

<div align="center">

# tinyest

Tiny Embeddable Syntax Tree -
[GitHub](https://github.com/software-mansion/TypeGPU/tree/main/packages/tinyest)

</div>

A compact, fast, and embeddable JavaScript AST for transpilation.

### Source mapping

Tinyest supports source mapping. 
Use `embedSourceMap` function to obtain a new node with the source map embedded.
Use `stripSourceMap` function to restore the original node and source map.

Note that both functions create a new AST instead of modifying the existing one:

```ts
const node: Identifier = [NodeTypeCatalog.identifier, 'ident'];
const sourceMap: SourceMap = new Map([[node, [1, 2]]]);

const sourceMappedNode = embedSourceMap(node, sourceMap);
const [restoredNode, restoredSourceMap] = stripSourceMap(sourceMappedNode);

console.log(restoredNode); // [9, 'ident'];
console.log(restoredSourceMap.get(restoredNode)); // [1, 2];

console.log(node === restoredNode); // false
console.log(restoredSourceMap.get(node)); // undefined
```

### Projects using tinyest

- [TypeGPU](https://typegpu.com) - A TypeScript library that enhances the WebGPU
  API, allowing resource management in a type-safe way.

## tinyest is created by Software Mansion

[![swm](https://logo.swmansion.com/logo?color=white&variant=desktop&width=150&tag=typegpu-github 'Software Mansion')](https://swmansion.com)

Since 2012 [Software Mansion](https://swmansion.com) is a software agency with
experience in building web and mobile apps. We are Core React Native
Contributors and experts in dealing with all kinds of React Native issues. We
can help you build your next dream product –
[Hire us](https://swmansion.com/contact/projects?utm_source=tinyest&utm_medium=readme).

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