at-template
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

at-template

Build Status npm version

JavaScript template engine with @{atSign} syntax.

Usage

  • @{variable} for string replacement
  • @@{variable} for escaping
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.

Readme

Keywords

Package Sidebar

Install

npm i at-template

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

3.38 kB

Total Files

4

Last publish

Collaborators

  • fuji_haruka