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 🙏

© 2025 – Pkg Stats / Ryan Hefner

rigidml

v2.4.1

Published

Simplifies website and API development with an easy to use wrapper for HTML, CSS, and a few JS libraries.

Downloads

22

Readme

Rigid Markup Library

Example (index.js)

const {listen} = require("rigidml");

const port = +(process.argv[2] || "8080");
const app = listen(port);
app.pageFile("/", "home.js");
console.log(`The example page is now listening on port ${port}.`);

Example (home.js)

h1 => [
	($id) => 'dissapearing',
	(color) => 'red',
	(fontFamily) => 'Sans-Serif',
	(fontSize) => '64px',
	"Hello, ", p => [
		(color) => 'blue',
		(display) => 'inline-block',
		"world"
	], "!"
],
script => `setTimeout(() => $("#dissapearing").hide(), 5000)`

Scope Object

this.components The object that contains all of the components.
this.request The HTTP request object passed from express.
this.response The HTTP response object passed from express.
this.path The directory from which this RML script was called from.
this.document The NodeJS document object which contains the DOM.
this.on Helper that executes an item on a specific element.
this.data Data object that contains items passed from the handler.

Application

app.page(url, text, dir, handler) Handles get requests with RigidML source text.
app.pageFile(url, file, handler) Handles get requests with a RigidML file.
app.api(url, handler) Handles post requests with an API utility object.
app.apiFile(url, file) Handles post requests in a file in a bound utility object.
app.static(path) Includes a static folder on the application.
app.rateLimit(url, amount, seconds, message) Applies a rate limit to a url.
app.get(url, handler) Handles raw get requests.
app.post(url, handler) Handles raw post requests.
app.put(url, handler) Handles raw put requests.
app.patch(url, handler) Handles raw patch requests.
app.delete(url, handler) Handles raw delete requests.

API Utility

util.request The raw request object.
util.response The raw response object.
util.data The JSON data parsed from the body.
util.cookies An assignable object of the browser's cookies.
util.cookie(key, val, options) Assigns a cookie to the response.
util.result(message) Sends a 200 status code and an success message.
util.error(message) Sends a 400 status code and an error message.
util.updateCookies() Updates the cookies from the request to the response.

Literals

array Each item in the list is executed individually.
function Many things can be done with arrow functions, shown below.
string Treated as plain HTML and is appended to the target element.
number Treated as plain HTML and is appended to the target element.
boolean Treated as plain HTML and is appended to the target element.
bigint Treated as plain HTML and is appended to the target element.
object Stringified as JSON and is appended to the target element.
symbol Description treated as plain HTML and is appended to the target element.
undefined Nothing is applied or done with an undefined value.

Functions

key => val The simplest type of function. Makes an HTML element.
(key) => val Defines a CSS property on the active element.
($key) => val Assigns an HTML property to the active element.
($) => val Includes a file relative to the current file.
$key => val Instantiates an existing component.
$ => key => val Defines a component that can be reused.
() => val Gets executed once the element is reached.