gap-front-tpl

1.0.1 • Public • Published

Gap Front Tpl

Install

$ yarn add gap-node-tpl

Usage

import {tpl, escapeHtml, scriptJson} from 'gap-front-tpl';
 
escapeHtml('<p>hello</p>'); //'&lt;p&gt;hello&lt;/p&gt;'
 
scriptJson({k1: 'v1'}); // '<script type="text/javascript">{"k1":"v1"}</script><div class="data-rendering"></div>'
 
tpl`
<div>
    <h1>Gap Front Tpl</h1>
    <pre>$${'<code>coding here</code>'}</pre>
</div>
`
/*
<div> <h1>Gap Front Tpl</h1> <pre>&lt;code&gt;coding here&lt;/code&gt;</pre> </div>
*/
 

Readme

Keywords

Package Sidebar

Install

npm i gap-front-tpl

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

4.11 kB

Total Files

14

Last publish

Collaborators

  • zhanjh