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

@demity/demity-common

v1.0.10

Published

A TypeScript library providing shared models, types, and utilities for the Demity platform. This library is designed to simplify type sharing between projects such as `buyer-mobile`, `seller-web`, `buyer-web`, and others, ensuring consistency and mainta

Readme

demity-common

A TypeScript library providing shared models, types, and utilities for the Demity platform. This library is designed to simplify type sharing between projects such as buyer-mobile, seller-web, buyer-web, and others, ensuring consistency and maintainability.

Here is the link to the Demity NPM package: https://www.npmjs.com/package/demity-common


Features

  • Shared TypeScript models for sellers, products, claims, recalls, warranties, and more.
  • Lightweight and reusable library designed for seamless integration across Demity projects.
  • Published as an NPM package for easy consumption.

Local Setup

Prerequisites

  • Node.js v16+
  • NPM v8+ or Yarn

Clone the Repository

git clone https://github.com/demity/demity-common.git
cd demity-common

Install Dependencies

npm install

Run the TypeScript Compiler

To ensure the code compiles correctly:

npm run build

This will generate the compiled .js and .d.ts files in the dist/ directory.


Deployment

Automated Deployment via GitHub Actions

The library is configured for automated deployment using GitHub Actions. On every push to the main branch:

  1. The version is automatically incremented (patch-level).
  2. The library is built and published to NPM.

Using the Library in Another Project

Install the Library

Install the library in your project via NPM:

npm install demity-common

Example Usage

Import the models or types into your project as needed.

Example: Using in a React Component

import { Seller, Product } from 'demity-common';

const seller: Seller = {
  id: "123",
  name: "John Doe",
  email: "[email protected]",
};

const product: Product = {
  id: "456",
  name: "Extended Warranty",
  price: 99.99,
  stock: 50,
};

export default function SellerInfo() {
  return (
    <div>
      <h1>{seller.name}</h1>
      <p>Email: {seller.email}</p>
      <p>Product: {product.name}</p>
    </div>
  );
}

Contributing

We welcome contributions to improve the demity-common library! Follow these steps to get started:

1. Fork the Repository

  • Fork this repository to your GitHub account.
  • Clone your forked repository:
    git clone https://github.com/your-username/demity-common.git
    cd demity-common

2. Create a Feature Branch

git checkout -b feature/your-feature-name

3. Make Your Changes

  • Add or update types, models, or utilities in the src directory.
  • Write corresponding tests (if applicable).

4. Test Your Changes

  • Build the library to ensure everything compiles correctly:
    npm run build
  • Run any unit tests (if available):
    npm test

5. Commit and Push

git add .
git commit -m "feat: add [your feature]"
git push origin feature/your-feature-name

6. Create a Pull Request

  • Open a pull request from your feature branch to the main branch of the original repository.
  • Provide a clear description of your changes and their purpose.

This README provides detailed information for setting up, deploying, using, and contributing to the library. Let me know if you'd like to modify any section further!

TODO: convert to private package before final launch