Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imranbarbhuiya/tagscript
A simple and safe template engine.
https://github.com/imranbarbhuiya/tagscript
hacktoberfest safe-parsing string-parser tagscript
Last synced: about 4 hours ago
JSON representation
A simple and safe template engine.
- Host: GitHub
- URL: https://github.com/imranbarbhuiya/tagscript
- Owner: imranbarbhuiya
- License: mit
- Created: 2022-04-19T06:26:01.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T10:06:11.000Z (17 days ago)
- Last Synced: 2024-10-29T12:11:34.602Z (17 days ago)
- Topics: hacktoberfest, safe-parsing, string-parser, tagscript
- Language: TypeScript
- Homepage: https://tagscript.js.org
- Size: 18.1 MB
- Stars: 25
- Watchers: 3
- Forks: 5
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# TagScript
**A simple and safe template engine.**
[![Continuous Integration](https://github.com/imranbarbhuiya/TagScript/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/imranbarbhuiya/TagScript/actions/workflows/continuous-integration.yml)
[![codecov](https://codecov.io/gh/imranbarbhuiya/tagscript/branch/main/graph/badge.svg?precision=2)](https://codecov.io/gh/imranbarbhuiya/tagscript)## Packages
[![npm](https://img.shields.io/npm/v/tagscript?color=crimson&logo=npm&style=flat-square)](https://www.npmjs.com/package/tagscript)
[![codecov](https://codecov.io/gh/imranbarbhuiya/tagscript/branch/main/graph/badge.svg?precision=2&flag=tagscript)](https://codecov.io/gh/imranbarbhuiya/tagscript)
[![npm-tagscript](https://img.shields.io/npm/dw/tagscript)](https://www.npmjs.com/package/tagscript)
[![npm](https://img.shields.io/npm/v/@tagscript/plugin-discord?color=crimson&logo=npm&style=flat-square&label=@tagscript/plugin-discord)](https://www.npmjs.com/package/@tagscript/plugin-discord)
[![codecov-tagscript](https://codecov.io/gh/imranbarbhuiya/tagscript/branch/main/graph/badge.svg?precision=2&flag=plugin-discord)](https://codecov.io/gh/imranbarbhuiya/tagscript)
[![npm-tagscript-plugin-discord](https://img.shields.io/npm/dw/@tagscript/plugin-discord)](https://www.npmjs.com/package/@tagscript/plugin-discord)## Description
TagScript is a drop in easy to use string interpreter that lets you provide users with ways of customizing their profiles or chat rooms with interactive text.
Read Full Documentation [here](https://tagscript.js.org/).
## Features
- Written In Typescript
- Offers CJS, ESM and UMD builds
- Full TypeScript & JavaScript support
- Blazingly Fast ⚡
- Simple, expressive and safe template engine.
- Supports many [plugins](https://github.com/imranbarbhuiya/tagscript/packages/).## Usage
---
**Note:** While examples uses `import`, it maps 1:1 with CommonJS' require syntax. For example,
```ts
import { Interpreter } from 'tagscript';
```is the same as
```js
const { Interpreter } = require('tagscript');
```---
```ts showLineNumbers
import { Interpreter, RandomParser, RangeParser, FiftyFiftyParser, IfStatementParser, SliceParser } from 'tagscript';
const ts = new Interpreter(new SliceParser(), new FiftyFiftyParser(), new RandomParser(), new IfStatementParser());const result = await ts.run(
`
{random: Parbez,Rkn,Priyansh} attempts to pick the lock!,
I pick {if({5050:.}!=):heads|tails}
`
); // Parbez attempts to pick the lock!, I pick heads
```For more usage, check out the documentation [here](https://tagscript.js.org/).
## Buy me some doughnuts
If you want to support me by donating, you can do so by using any of the following methods. Thank you very much in advance!
## Contributors ✨
Thanks goes to these wonderful people: