https://github.com/dergoogler/stringtemp
Inject an array of items in to a string replacing selected values.
https://github.com/dergoogler/stringtemp
Last synced: 8 months ago
JSON representation
Inject an array of items in to a string replacing selected values.
- Host: GitHub
- URL: https://github.com/dergoogler/stringtemp
- Owner: DerGoogler
- License: mit
- Created: 2022-08-20T10:11:45.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-20T10:24:26.000Z (almost 4 years ago)
- Last Synced: 2025-02-04T09:15:37.357Z (over 1 year ago)
- Language: TypeScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# StringTemp
Inject an array of items in to a string replacing selected values.
## Install
```shell
bun add stringtemp
```
## Setup
```ts
import StringTemp from "stringtemp";
const str = new StringTemp("{", "}");
const hello = srt.inject("Hello {name}", { name: "Kevin" });
console.log(hello);
```