Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!"
    }
  )
);

About

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

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages