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

@aardpro/time-id

v1.0.0

Published

一个根据时间戳产生唯一id的方法,并且能够自定义后缀,用来取代uuid和数字自增id。A method that generates a unique id based on the current timestamp in milliseconds, and can also be used to generate a unique id with a suffix, which can be used to replace uuid and numeric auto-increment id

Readme

@aardpro/time-id

一个根据时间戳产生唯一ID的方法,并且能够自定义后缀,用来取代uuid和数字自增id。

A method that generates a unique ID based on the current timestamp in milliseconds, with support for custom suffixes. Can be used to replace UUID and numeric auto-increment IDs.

在线演示 | Playground

中文文档 | English

Features

  • Compact: Only 7-10 characters typically, compared to UUID v4's 36 characters
  • Roughly Sortable: Based on timestamp, similar generation times produce similar IDs
  • High Performance: Uses base26 encoding (a-z), more compact than hexadecimal
  • Flexible: Supports custom suffix length and accumulator for distributed scenarios

Installation

# pnpm
pnpm i @aardpro/time-id

# npm
npm i @aardpro/time-id

# yarn
yarn add @aardpro/time-id

# bun
bun i @aardpro/time-id

Quick Start

import { timeId } from '@aardpro/time-id';

const id = timeId();
// Example output: 'lgskjwabc'
// Format: {timestamp_base26}{3_char_suffix}

Publishing to npm

For maintainers who want to publish this package:

# 1. Install dependencies
npm install

# 2. Run tests
npm test

# 3. Build the package
npm run build

# 4. Check the dist directory
ls dist

# 5. Login to npm (if not already logged in)
npm login

# 6. Publish to npm (for scoped packages, use --access public)
npm publish --access public

# 7. Or publish a beta version
npm publish --tag beta

Note: This package uses the scoped name @aardpro/time-id, which requires --access public flag during publish.

License

MIT