https://github.com/fujiharuka/at-template
JavaScript template engine with @{atSign} syntax.
https://github.com/fujiharuka/at-template
Last synced: 4 days ago
JSON representation
JavaScript template engine with @{atSign} syntax.
- Host: GitHub
- URL: https://github.com/fujiharuka/at-template
- Owner: FujiHaruka
- Created: 2019-06-13T14:43:31.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T17:50:24.000Z (over 2 years ago)
- Last Synced: 2025-02-08T13:49:05.574Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 50.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# at-template
[](https://travis-ci.org/FujiHaruka/at-template)
[](https://badge.fury.io/js/at-template)JavaScript template engine with @{atSign} syntax.
## Usage
* `@{variable}` for string replacement
* `@@{variable}` for escaping```js
const AtTemplate = require('at-template')
const template = AtTemplate.compile('Hello, my name is @{name}. I am from @{hometown}.')
const result = template({
name: 'Fuji',
hometown: 'Somewhere'
})console.log(result)
// > Hello, my name is Fuji. I am from Somewhere```
That's all.