rendy
simplest template engine
Last updated 2 months ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install rendy 
SYNC missed versions from official npm registry.

Rendy License NPM version Build Status Coverage

Simple template engine compatible with handlebars and mustache.

Install

NPM_INFO

npm i rendy

How to use?

import {rendy} from 'rendy';

API

rendy(template: string, value: Values, modifiers?: Modifiers)

Values is:

type Values = {
    [key: string]: unknown;
};
type Modifiers = {
    [key: string]: (value: unknown) => string;
};
rendy('hello {{ value }}', {
    value: 'world',
});

// returns
'hello world';

const values = {
    names: ['a', 'b', 'c'],
};

const modifiers = {
    implode: (a) => a.join(', '),
};

rendy('hello {{ names | implode }}', values, modifiers);
// returns
'hello a, b, c';

License

MIT

Current Tags

  • 5.0.0                                ...           latest (2 months ago)

20 Versions

  • 5.0.0                                ...           2 months ago
  • 4.1.3                                ...           2 years ago
  • 4.1.2                                ...           3 years ago
  • 4.1.1                                ...           3 years ago
  • 4.1.0                                ...           3 years ago
  • 4.0.1                                ...           3 years ago
  • 4.0.0                                ...           3 years ago
  • 3.1.1                                ...           6 years ago
  • 3.1.0                                ...           6 years ago
  • 3.0.1                                ...           7 years ago
  • 3.0.0                                ...           7 years ago
  • 2.0.0                                ...           8 years ago
  • 1.1.1                                ...           8 years ago
  • 1.1.0                                ...           11 years ago
  • 1.0.6                                ...           11 years ago
  • 1.0.5                                ...           11 years ago
  • 1.0.4                                ...           11 years ago
  • 1.0.3                                ...           11 years ago
  • 1.0.2                                ...           11 years ago
  • 1.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 18
Last Day 0
Last Week 18
Last Month 1
Dependencies (0)
None
Dev Dependencies (9)

Copyright 2013 - present © cnpmjs.org | Home |