Popularity
0.4
Stable
Activity
0.0
Stable
32
4
0

Description

Writing a PowJS Template just like Writing an ECMAScript Function.

demo: https://jsfiddle.net/achun/nerajbop/

Only 12 directives: Of course, in fact, they will not appear at the same time.

func="name"

param="parameter, B,C"

if="create_conditions"

let="val=1,list=[1,2,3]"

do="your_code()"

render="list,val"

each="list,val"

text="'textContent equal' + val"

html="'innerHTML equal' + val"

end="All_stop_conditions_and_the_default_is_true"

skip="Dont_render_sublayer_conditions_and_the_default_is_true"

break="Dont_render_siblings_and_the_default_is_true"

They correspond with the function code:

function name (parameter, B,C) {

if (!create_conditions) return;

let val=1, list=[1,2,3];

your_code();

this.render(list, v);

this.each(list, v);

this.text('textContent equal' + val);

this.html('innerHTML equal' + val);

if (All_stop_conditions_and_the_default_is_true) {

return this.end();

}

if (Dont_render_sublayer_conditions_and_the_default_is_true) {

return this.skip();

}

if (Dont_render_siblings_and_the_default_is_true) {

this.break(); // Set internal flag

}

}

Monthly Downloads: 0
Programming language: JavaScript
License: MIT
Tags: Templating Engines     ES6     Functional    

PowJS alternatives and similar libraries

Based on the "Templating Engines" category

Do you think we are missing an alternative of PowJS or a related project?

Add another 'Templating Engines' Library