
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
rc-compiler
Advanced tools
very fast js compiler angular-way style
version 0.1.4
0.1.1 initial functional
0.1.2 add rc-repeat-obj directive
0.1.3 add rc-div directive
0.1.4 first optimize compiled code, set Ect test
ect example template render 1 000 000 iterations by ~450ms
(100 000 iterations by 45ms)
Ect test
template.html:
js:
// compile template var fs = require('fs'); var template = require('../rc-compiler').compile(fs.readFileSync('./templates/simple.html')); // render template var html = template({ title: 'Page title', users: [ {name: 'Maria', age: 27}, {name: 'Mike', age: 32} ], showUsers: true }); console.log(html);
result:
> ```html
<h3>Page title</h3>
<div>
<ul>
<li>
<span>
<b>name:</b>
Maria
</span><span>
<b>age:</b>
27
</span>
</li><li>
<span>
<b>name:</b>
Mike
</span><span>
<b>age:</b>
32
</span>
</li>
</ul>
</div>
rc-out, rc-if, rc-repeat, rc-repeat-obj, rc-div
desc: put variable in this tag.
example:
<title rc-out="title"></title>
result:
<title>Page title</title>
desc: show/hide node and childs
warn! now support only simple expression (no this:a + d.x && b.prop || c.f())
example:
<div rc-if="isAccessible"> ... </div>
result: if variable isAccessible is true put this node
desc: repeat node by data array
example:
<li rc-repeat="users[user]">{{user.name}} ({{user.age}})</li>
result:
<li>Maria (27)</li>
<li>Mike (32)</li>
desc: repeat node by data object fields
example:
<li rc-repeat="users[user]">
<span rc-repeat-obj="user{prop}">
<b>{{$key}}:</b>
{{prop}}
</span>
</li>
result:
<li>
<span>
<b>name:</b>
Maria
</span>
<span>
<b>age:</b>
27
</span>
</li>
<li>
<span>
<b>name:</b>
Mike
</span>
<span>
<b>age:</b>
32
</span>
</li>
desc: divide array for col view
example:
<div class="col" rc-div="numbers/3 as part">
<div rc-repeat="part[number]">{{number}}</div>
</div>
data:
var numbers = [1, 2, 3, 4, 5, 6, 7];
result:
<div class="col">
<div>1</div>
<div>2</div>
<div>3</div>
</div>
<div class="col">
<div>4</div>
<div>5</div>
<div>6</div>
</div>
<div class="col">
<div>7</div>
</div>
FAQs
very fast js compiler angular-way style
We found that rc-compiler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.