Skip to content
/ ntrp Public

Interpolate a templated string using `{{` and `}}` delimiters, and the key/values from an object.

License

Notifications You must be signed in to change notification settings

progging/ntrp

Repository files navigation

NTRP

Interpolate a templated string using {{ and }} delimiters, and the key/values from an object.

Install

npm i -S ntrp or yarn add ntrp

Usage

//Keys in both the template string and object are case-insensitive.
const str = ntrp('{{greeting}} {{GREETING}}, {{entity}}!', {
  greeting: 'Hello',
  ENTITY: 'World',
})

console.log(str) // "Hello Hello, World!"

Test

npm i && npm t

License

MIT

About

Interpolate a templated string using `{{` and `}}` delimiters, and the key/values from an object.

Resources

License

Stars

Watchers

Forks

Packages

No packages published