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

@dasl/tile-writer

v2.0.0

Published

Write DASL tiles into CAR-based .tile files

Readme

@dasl/tile-writer

Write DASL tiles into CAR-based .tile files.

A tile is a bundle of web resources (an index.html, images, scripts…) addressed by content and described by MASL metadata. TileWriter takes that metadata plus a set of source files, content-addresses each resource, and streams out a single .tile (a CAR) with the metadata in the header and the resource bytes as blocks. Identical resources are de-duplicated into a single block.

Node.js only — it reads source files and writes the output with node:fs.

Install

npm install @dasl/tile-writer

Usage

import TileWriter from '@dasl/tile-writer';

const tw = new TileWriter({
  name: `My Cat`,
  description: `This basic tile is a picture of my cat.`,
});

// addResource(path, headers, source)
tw.addResource('/', { 'content-type': 'text/html' }, { path: '/path/to/index.html' });
tw.addResource('/img/kitsu.jpg', { 'content-type': 'image/jpeg' }, { path: '/path/to/kitsu.jpg' });

await tw.write('/path/to/output.tile');

The result round-trips through @dasl/tile-car-reader.

API

new TileWriter(masl)

masl is the tile's MASL metadata (a WriterMasl — e.g. name, description, icons, sizing…). Passing single-resource metadata that carries its own src throws — that shape is for a lone resource, not a tile.

writer.setMASL(masl)

Replace the metadata.

writer.addResource(path, headers, source)

  • path — the request path the resource answers to (query strings are dropped; / is the tile root, typically your index.html).
  • headers — a MaslHeaders object. Unsupported headers are dropped with a warning; content-type is the one you'll usually set. See supportedHTTPHeaders for the current allowlist.
  • source{ path } pointing at the file to read the bytes from.

await writer.write(out)

Content-addresses every resource, de-duplicates identical blocks, and writes the .tile (CAR) to the file path out.

supportedHTTPHeaders

A Set<string> of the HTTP headers currently persisted into a tile.

Part of DASL tiles

License

Apache-2.0