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

2.1.0 • Public • Published

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

Dependencies (0)

    Dev Dependencies (10)

    Package Sidebar

    Install

    npm i ntrp

    Weekly Downloads

    0

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    2.81 kB

    Total Files

    3

    Last publish

    Collaborators

    • progging