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

omn

v1.1.2

Published

A practical, lightweight and unique JavaScript toolkit.

Readme

Omn

npm npm downloads package size

omn 是一个适用于 AI 编程的提供独特和实用工具函数的 npm 库——就像 lodashramda 等库一样,但它更贴近实际应用场景、更 “接地气”,也更现代化。

文档

在线文档

Agent Skills

omn 现在提供 配套的 Agent Skills,安装后,你的 AI 编程助手可以理解和使用其中的工具函数。

亮点

  • 提供更独特更实用的工具函数;
  • 有配套的 Agent Skills,和 AI 协同更方便;
  • 更好的兼容性,提供 CommonJS、ESModule、UMD 等多种模块入口;
  • 完全 TypeScript 类型支持和完善的 JSDoc 注释;
  • 无副作用,支持 TreeShaking;
  • 代码体积小,零依赖。

起步

安装:

npm add omn

使用 HTML 标签引入(建议加上 @<版本号>):

<script src="https://unpkg.com/omn"></script>

示例

格式化电话号码:

import { formatPhoneNumber } from 'omn'

formatPhoneNumber('13788889999', 'xxx **** xxxx')
// → "137 **** 9999"

汉字视作 2 字符长度:

import { lengthOfEn } from 'omn'

lengthOfEn('你好')
// → 4

在满足条件前不断重试/轮询:

const result = await retry(() => axios.get('/api/task/status'), {
  timeout: 30 * 1000,
  interval: 500,
  success: res => res.data.status === 'done',
})

if (result.success) {
  console.log('任务完成,结果:', result.data)
} else {
  console.log('轮询失败,原因:', result.reason)
}