@deyan.d/chops

1.0.2 • Public • Published

Chops

Simple template engine similar to mustache.js and handlebars.js

Install

You can get Chops via npm or yarn.

npm install @deyan.d/chops --save
yarn add @deyan.d/chops

Usage

import { chop } from "./chop.ts";

const datatest = {
  bread: "baguette",
  cheese: "brie cheese",
};

const myTemplate = "I like to eat {{bread}} and {{cheese}}";
chop(myTemplate, dataset);

// Will render: 'I like to eat baguette and brie cheese'

Templates

A chops string is a string that contains any number of chops tags. Tags are indicated by the double mustaches that surround them. {{person}}. Currently Chops supports only a single level depth of templating through the dataset.

Supported Environments

Handlebars has been designed to work in any ECMAScript 2020 environment. This includes

  • Node.js
  • Chrome
  • Firefox
  • Safari
  • Edge

Readme

Keywords

none

Package Sidebar

Install

npm i @deyan.d/chops

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

18.4 kB

Total Files

15

Last publish

Collaborators

  • deyan.dachev