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

@deadcode-uk/archivum

v0.1.9

Published

Helper functions for JavaScript and TypeScript that compliment the libSQL client

Readme

Archivum

Helper functions for JavaScript and TypeScript that compliment the libSQL client

Installation

npm install @deadcode-uk/archivum

Peer Dependencies

Your project will need to include the following packages:

@libsql/client

sqlite

sqlite is used as a template literal tag, and simplifies the creation of query statements, especially when arguments need to be passed into the statement

import { createClient } from "@libsql/client"
import { sqlite } from "@deadcode-uk/archivium"

const client = createClient(...)

export async function soSomething(): Promise<void> {
    const someValue = 100

    await client.execute(sqlite`
        SELECT * FROM my_table WHERE my_column = ${someValue} LIMIT 1
    `)
}

That would produce the same result as:

import { createClient } from "@libsql/client"
import { sqlite } from "@deadcode-uk/archivium"

const client = createClient(...)

export async function soSomething(): Promise<void> {
    const someValue = 100

    await client.execute({
        sql: "SELECT * FROM my_table WHERE my_column = ? LIMIT 1",
        args: [someValue]
    })
}

row and rows

The row and rows functions are for use in TypeScript, they essentially handle type-casting of the result object returned from libSQL queries

import { createClient } from "@libsql/client"
import { row, rows, sqlite } from "@deadcode-uk/archivium"

const client = createClient(...)

export type Example = {
    id: number
    created_at: number
    updated_at: number
}

export async function fetchFirstExample(): Promise<Example | null> {
    const result = await client.execute(sqlite`
        SELECT * FROM examples LIMIT 1
    `)

    return row(result) // or row<Example>(result)
}

export async function fetchAllExamples(): Promise<Example[]> {
    const result = await client.execute(sqlite`
        SELECT * FROM examples
    `)

    return rows(result) // or rows<Example>(result)
}

Row<T> and Rows<T>

The Row<T> type will add id, created_at, and updated_at to the type T

The Rows<T> type is an alias for Row<T>[]

import { createClient } from "@libsql/client"
import { Row, Rows, row, rows, sqlite } from "@deadcode-uk/archivium"

const client = createClient(...)

type Article = {
    slug: string
    title: string
    content: string
}

export async function createArticle(article: Article): Promise<void> {
    await client.execute(sqlite`
        INSERT INTO articles (
            slug, title, content
        ) VALUES (
            ${article.slug}, ${article.title}, ${article.content}
        )
    `)
}

export async function fetchArticle(slug: string): Promise<Row<Article> | null> {
    const result = await client.execute(sqlite`
        SELECT * FROM articles WHERE slug = ${slug} LIMIT 1
    `)

    return row(result)
}

export async function fetchArticles(): Promise<Rows<Article>> {
    const result = await client.execute(sqlite`
        SELECT * FROM articles
    `)

    return rows(result)
}