rendy
simplest template engine
Last updated a year ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm 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?

In ESM

import rendy from 'rendy';

in CommonJS:

const rendy = require('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

  • 4.1.3                                ...           latest (a year ago)

19 Versions

  • 4.1.3                                ...           a year ago
  • 4.1.2                                ...           a year ago
  • 4.1.1                                ...           a year ago
  • 4.1.0                                ...           a year ago
  • 4.0.1                                ...           a year ago
  • 4.0.0                                ...           a year ago
  • 3.1.1                                ...           4 years ago
  • 3.1.0                                ...           4 years ago
  • 3.0.1                                ...           5 years ago
  • 3.0.0                                ...           5 years ago
  • 2.0.0                                ...           7 years ago
  • 1.1.1                                ...           7 years ago
  • 1.1.0                                ...           10 years ago
  • 1.0.6                                ...           10 years ago
  • 1.0.5                                ...           10 years ago
  • 1.0.4                                ...           10 years ago
  • 1.0.3                                ...           10 years ago
  • 1.0.2                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (10)

© 2010 - cnpmjs.org x YWFE | Home | YWFE