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

@croco/problems-core

v0.0.2

Published

RFC 7807 Problem Details 기반의 공통 에러 계층입니다. Croco 패키지 전반에서 일관된 HTTP 에러 표현을 만들 때 사용합니다.

Readme

@croco/problems-core

RFC 7807 Problem Details 기반의 공통 에러 계층입니다. Croco 패키지 전반에서 일관된 HTTP 에러 표현을 만들 때 사용합니다.

설치

pnpm add @croco/problems-core

사용법

Problem 서브클래스 정의

import { Problem, ProblemCategory } from "@croco/problems-core";

class UserNotFoundProblem extends Problem {
  constructor(userId: string) {
    super("user/not-found", ProblemCategory.NotFound, `사용자 '${userId}'를 찾을 수 없습니다.`);
  }
}

ProblemFactory 사용

import { ProblemFactory } from "@croco/problems-core";

throw ProblemFactory.validationError("user/invalid-email", "이메일 형식이 올바르지 않습니다.");

직렬화

import { ProblemSerializer } from "@croco/problems-core";

const json = ProblemSerializer.serialize(
  ProblemFactory.notFound("user/not-found", "사용자를 찾을 수 없습니다.").toJSON(),
);

API 레퍼런스

  • Problem: 모든 Problem 서브클래스의 기반 추상 클래스
  • ProblemCategory: HTTP 의미에 맞춘 카테고리 열거형
  • ProblemCategoryMapper, toHttpStatus, toTitle: 카테고리 매핑 유틸리티
  • ProblemFactory: 자주 쓰는 Problem 인스턴스 생성기
  • ProblemSerializer: 직렬화와 역직렬화
  • HttpStatus: 상태 코드 상수
  • ProblemExtensions, validateExtensions, isValidExtensions: 확장 필드 검증