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

@longzai-intelligence-error/core

v0.2.0

Published

Longzai Intelligence Error 领域异常类体系

Readme

@longzai-intelligence-error/core

Longzai Intelligence Error 的核心层包,为生态内各项目提供领域驱动设计的统一领域错误异常类体系。本包零外部依赖,仅含类型与基类定义。

简介

治理领域错误的单一异常来源:领域错误基类与十二类领域异常类统一收敛于本包,以「错误代码 + 上下文 + 原因链」表达业务失败语义并支持序列化,避免各项目自造异常形态与错误口径漂移。

能力

  • 领域错误基类:DomainError 抽象基类,统一领域错误的错误代码、上下文与序列化接口
  • 领域异常类:验证、实体未找到、仓储、权限拒绝、业务规则、并发冲突、配置、外部服务、实体重复、认证、资源未找到、未实现等十二类
  • 错误工厂:常用领域错误的工厂函数快捷创建
  • 错误上下文:错误代码、上下文数据与原始错误原因链
  • 可序列化:错误转 JSON 形态,支撑日志记录与 API 响应