Never Pummel Muskoxen

    templyte

    1.0.1 • Public • Published

    templyte

    Software License Build Status

    Simple and lightweight Javascript string template. Useful for simple string translations and text replacing.

    install

    You can install it if your Node.JS version is >= 6.x. Then run the following command:

    > npm install templyte --save

    usage

    Templyte is quite simple and easy to use. Just one method for render a string.

    const templyte = require('templyte');
     
    let myString = templyte.renderString('Hello {{who}}!', {who: 'world'});
    console.log(myString);  // Hello world!

    Also you can use a custom template tag like "[[ variable ]]" just adding third parameter to renderString method.

    const templyte = require('templyte');
    const delimiters = ['[[', ']]'];
    let myString = templyte.renderString('Hello [[who]]!', {who: 'world'}, delimiters);

    The renderString will escape the delimiters for regular expression security.

    Security

    If you discover any security related issues, use the issue tracker.

    Credits

    License

    The MIT License (MIT). Please see License File for more information.

    Install

    npm i templyte

    DownloadsWeekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    9.74 kB

    Total Files

    6

    Last publish

    Collaborators

    • sirodiaz