npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

rc-compiler

v0.1.4

Published

very fast js compiler angular-way style

Readme

rc-compiler

very fast js compiler angular-way style version 0.1.4

change logs

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

bench

ect example template render 1 000 000 iterations by ~450ms (100 000 iterations by 45ms) Ect test

usage

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>

support directives:

rc-out, rc-if, rc-repeat, rc-repeat-obj, rc-div

rc-out

desc: put variable in this tag. example:

<title rc-out="title"></title>

result:

<title>Page title</title>

rc-if

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


rc-repeat

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>

rc-repeat-obj

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>

rc-div

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>