Skip to content

afeiship/next-literal-tmpl

Repository files navigation

next-literal-tmpl

Literals template engine like es6.

version license size download

installation

npm install -S @jswork/next-literal-tmpl

usage

import '@jswork/next-literal-tmpl';

const str = '${GITHUB_API_TOKEN} - ${afei}';
const ctx = {
  GITHUB_API_TOKEN: 'xxx-yyy-zzz',
  afei: 'zhengfei'
};
nx.literalTmpl(str, ctx);

// 'xxx-yyy-zzz - zhengfei'

license

Code released under the MIT license.