https://github.com/rmariuzzo/untoken
A token replacement tool.
https://github.com/rmariuzzo/untoken
replace-text template-engine token untoken
Last synced: 7 months ago
JSON representation
A token replacement tool.
- Host: GitHub
- URL: https://github.com/rmariuzzo/untoken
- Owner: rmariuzzo
- License: mit
- Created: 2020-07-15T19:44:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-16T03:49:54.000Z (over 5 years ago)
- Last Synced: 2025-07-01T11:50:10.615Z (9 months ago)
- Topics: replace-text, template-engine, token, untoken
- Language: TypeScript
- Homepage:
- Size: 129 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

### Motivation
I have been looking for a simple tool that replace tokens in a given text with given set of values. Yes, the ability to _un-token_ a text.
## Installation
```sh
npm i untoken
```
## Usage
```ts
import { untoken } from 'untoken'
untoken('Hello {name}!', { name: 'Rubens' })
// Hello Rubens!
```
### Development
1. Clone this repo.
2. Install dependencies: `npm i`
3. Profit!
### Tests
```sh
npm t
```
### Publishment
Every semver tag pushed to this will be published [via GitHub Actions](.github/workflows/publish.yml).
Crafted by [Rubens Mariuzzo](https://github.com/rmariuzzo).
[MIT license](LICENSE)