# rocambole-token

> Helpers for rocambole AST token manipulation

Latest version **1.2.1** (published 2014-07-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install rocambole-token
pnpm add rocambole-token
yarn add rocambole-token
bun add rocambole-token
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2014-07-02 |
| First published | 2013-12-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Miller Medeiros |
| Maintainers | millermedeiros |
| Keywords | ast, token, rocambole |

## Links

- npm: https://www.npmjs.com/package/rocambole-token
- Repository: https://github.com/millermedeiros/rocambole-token
- Issues: https://github.com/millermedeiros/rocambole-token/issues
- npm.io page: https://npm.io/package/rocambole-token

## 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

- 1.2.1 (latest) — 2014-07-02
- 1.2.0 — 2014-07-02
- 1.1.2 — 2014-06-28
- 1.1.1 — 2014-06-17
- 1.1.0 — 2013-12-17
- 1.0.0 — 2013-12-10

## README

# rocambole-token

Helpers to manipulate [rocambole](https://github.com/millermedeiros/rocambole)
AST tokens.


## Why?

Created mainly to be used by
[esindent](https://github.com/millermedeiros/esindent/) and
[esformatter](https://github.com/millermedeiros/esformatter/).


## Important Notes

Right now all methods ignores the `loc` and `range` info of the tokens, this is
*by design* since updating the range and loc info on a large JS program
multiple times can be very expensive. It's *better* to write a separate tool to
*sanitize* this info and that can be executed as a separate step.

Also important to note that right now rocambole doesn't add any reference on
the token itself to the nodes that contain that token, so if you remove a token
that happens to be the `startToken` or `endToken` of any node you might have
some conflict if you start manipulating the tokens based on the `nodes`,
instead of the `token` LinkedList. - the `node.startToken` might be *detached*
from the LinkedList.

Test coverage is pretty low so far, but since it was mostly extracted from
esformatter the methods should work as expected. I started to write some tests
just to show how I would do it but did not had the time to finish it...
(ideally tests should be written before the implementation).


## License

Released under the MIT License.

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