Socket
Socket
Sign inDemoInstall

nbars

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    nbars

The tiniest and fastest javascript templating engine inspired by the fully featured Handlebarsjs


Version published
Weekly downloads
421
decreased by-16.14%
Maintainers
1
Install size
4.40 kB
Created
Weekly downloads
 

Readme

Source

nbars

The tiniest and fastest javascript templating engine inspired by the fully featured Handlebarsjs only 180 Bytes!

install
npm install nbars --save
Use
Node.js
const {NBars} = await import("nbars");
Browser
import NBars from "nbars";
Example
const {NBars} = await import("nbars");

//execute and "compile" in one.
console.log(
  NBars.transform(
    "Hello this is {{what}} of {{thing}} memes",
    {
      what:"bees?",
      thing:"fire"
    }
  )
);

// The Handlebars Way.
var template = NBars.compile("NBars is such a tiny <b>{{thing}}</b>");
// execute the compiled template and print the output to the console
console.log(
  template(
    {
      thing: "mustache!"
    }
  )
);

Keywords

FAQs

Last updated on 22 Mar 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc