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

@dotdo/gitx

v0.1.4

Published

Pure Git implementation in TypeScript - object parsing, pack files, delta compression, refs. With AsyncFn pattern support.

Downloads

10

Readme

@dotdo/gitx

Pure Git implementation in TypeScript. Parse objects, read/write pack files, handle delta compression, manage refs. Zero dependencies - runs anywhere JavaScript runs.

This is the core package that provides platform-agnostic Git functionality. For Cloudflare Workers/Durable Objects integration, see gitx.do.

Installation

npm install @dotdo/gitx

Features

  • Git Objects - Parse and create blobs, trees, commits, and tags
  • Pack Files - Read and write git pack format with delta compression
  • Refs Management - Handle branches, tags, HEAD, and symbolic refs
  • Protocol Support - Smart HTTP protocol for fetch/push

Usage

import {
  parseObject,
  createCommit,
  createTree,
  hashObject
} from '@dotdo/gitx'

// Parse a git object
const obj = parseObject(buffer)
// { type: 'commit', size: 245, data: {...} }

// Create a tree
const tree = createTree([
  { mode: '100644', name: 'README.md', hash: 'abc123...' },
  { mode: '040000', name: 'src', hash: 'def456...' }
])

// Create a commit
const commit = createCommit({
  tree: treeHash,
  parents: [parentHash],
  author: { name: 'Dev', email: '[email protected]', timestamp: Date.now() },
  message: 'Initial commit'
})

// Hash an object
const hash = await hashObject('blob', content)

Subpath Exports

import { Blob, Tree, Commit, Tag, parseObject } from '@dotdo/gitx/objects'
import { PackReader, PackWriter, applyDelta } from '@dotdo/gitx/pack'
import { RefStorage, parseRef, resolveRef } from '@dotdo/gitx/refs'
import { smartHttp, pktLine } from '@dotdo/gitx/protocol'

API

Objects (@dotdo/gitx/objects)

  • parseObject(buffer: Uint8Array): GitObject
  • createBlob(content: string | Uint8Array): Uint8Array
  • createTree(entries: TreeEntry[]): Uint8Array
  • createCommit(data: CommitData): Uint8Array
  • createTag(data: TagData): Uint8Array
  • hashObject(type: string, data: Uint8Array): Promise<string>

Pack (@dotdo/gitx/pack)

  • PackReader - Read objects from pack files
  • PackWriter - Write pack files with delta compression
  • applyDelta(base: Uint8Array, delta: Uint8Array): Uint8Array
  • createDelta(source: Uint8Array, target: Uint8Array): Uint8Array

Refs (@dotdo/gitx/refs)

  • parseRef(content: string): Ref
  • resolveRef(name: string, storage): Promise<string>
  • RefStorage - Interface for ref persistence

Protocol (@dotdo/gitx/protocol)

  • pktLine.encode(data: string): Uint8Array
  • pktLine.decode(buffer: Uint8Array): string[]
  • smartHttp.advertiseRefs(refs: Ref[]): Uint8Array

Related

  • gitx.do - Managed service with R2 storage
  • fsx.do - Filesystem for Workers
  • bashx.do - Shell execution for Workers

License

MIT