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

git-using-javascript

v1.0.1

Published

A custom Git implementation using JavaScript

Downloads

5

Readme

Implemented Git Functionality Using JavaScript

This project is a custom implementation of Git functionality, providing a set of core Git operations using Node.js. It enables performing essential Git operations such as initializing a Git repository, managing Git objects (commit, tree, blob), staging and committing files, and cloning remote repositories directly from the command line.

Features

  • Git Directory Initialization (init): Creates a basic .git directory structure with necessary subdirectories and a default HEAD file pointing to the main branch.

  • Cat File (cat-file): Retrieve information about objects (like commits) stored in the Git repository using their SHA hash.

  • Hash Object (hash-object): Hash files and store them as Git objects.

  • List Tree (ls-tree): List the contents of a commit or tree object, showing files and directories.

  • Write Tree (write-tree): Write the current state of the staged files to a new tree object.

  • Commit Tree (commit-tree): Create a new commit object from a tree object, parent commit SHA, and a commit message.

  • Clone Repository (clone): Clone a repository from a remote URL to a local directory.

Usage

After installation, you can use the various Git functionalities by running commands in your terminal. Here are some examples:

Usage

After installation, you can use the various Git functionalities by running commands in your terminal. Here are some examples:

  • Initialize a Git Repository:

    gitjs init
  • Hash a File:

    gitjs hash-object <file-path>
  • Clone a Remote Repository:

    gitjs clone <repository-url> <directory>
  • Commit a Tree:

    gitjs commit-tree <tree_sha> -p <commit_sha> -m "<message>"
  • Write a Tree:

    gitjs write-tree <sha>
  • List Tree with --name-only:

    gitjs ls-tree --name-only <sha>
  • Hash a File and Store It:

    gitjs hash-object -w <filepath>
  • View Git Object Information:

    gitjs cat-file -p <commitSHA>