Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

templyte

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

templyte

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

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

templyte

Software License Test library paypal

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 >= 14.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.

Keywords

FAQs

Package last updated on 21 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc