yepwrap

0.0.3 • Public • Published

YepWrap

Fast examples

With actual none-falsy var's (named class here) value

var tpl = '<${ name } $[[class="${ class }"]]>${ content }</${ name }>';

import t from 'yepwrap';

t(tpl, {name:'section',class:'zone-51',content:'42'});

result:

<section class="zone-51">42</section>

At first glance it available in ES2015:

`<${ name } class="${ class }">${ content }</${ name }>`

ok, see next exapmles:

With actual falsy var's (named class here) value

import { templateNoSpace as ts } from 'yepwrap'; // likes t, but removes **all** spaces around

ts(tpl, {name:'section',class:null,content:'42'});

result:

<section>42</section>
import { templateOneSpace as t1s } from 'yepwrap'; // likes t, but removes **extra** spaces around

t1s(tpl, {name:'section',class:null,content:'42'});

result (focus on space):

<section >42</section>

Readme

Keywords

Package Sidebar

Install

npm i yepwrap

Weekly Downloads

0

Version

0.0.3

License

MIT

Last publish

Collaborators

  • invntrm