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

@cocrepo/enum

v0.1.11

Published

Shared Enum

Downloads

46

Readme

@cocrepo/enum

프론트엔드와 백엔드에서 공유하는 열거형(Enum) 패키지입니다.

설치

pnpm add @cocrepo/enum

제공 열거형

CategoryTypes

카테고리 타입을 정의합니다:

import { CategoryTypes } from '@cocrepo/enum';

const category = CategoryTypes.SERVICE;

CategoryNames

카테고리 이름을 정의합니다:

import { CategoryNames } from '@cocrepo/enum';

const name = CategoryNames.PILATES;

GroupTypes

그룹 타입을 정의합니다:

import { GroupTypes } from '@cocrepo/enum';

const groupType = GroupTypes.TEAM;

GroupNames

그룹 이름을 정의합니다:

import { GroupNames } from '@cocrepo/enum';

const groupName = GroupNames.DEFAULT;

SessionTypes

세션 타입을 정의합니다:

import { SessionTypes } from '@cocrepo/enum';

const sessionType = SessionTypes.PRIVATE;
// SessionTypes.GROUP, SessionTypes.OPEN 등

RecurringDayOfWeek

반복 일정의 요일을 정의합니다:

import { RecurringDayOfWeek } from '@cocrepo/enum';

const days = [
  RecurringDayOfWeek.MONDAY,
  RecurringDayOfWeek.WEDNESDAY,
  RecurringDayOfWeek.FRIDAY,
];

RepeatCycleTypes

반복 주기 타입을 정의합니다:

import { RepeatCycleTypes } from '@cocrepo/enum';

const cycle = RepeatCycleTypes.WEEKLY;
// RepeatCycleTypes.DAILY, RepeatCycleTypes.MONTHLY 등

RoleCategoryNames

역할 카테고리 이름을 정의합니다:

import { RoleCategoryNames } from '@cocrepo/enum';

const roleCategory = RoleCategoryNames.SYSTEM;

RoleGroupNames

역할 그룹 이름을 정의합니다:

import { RoleGroupNames } from '@cocrepo/enum';

const roleGroup = RoleGroupNames.ADMIN;

파일 구조

src/
├── category-names.enum.ts       # 카테고리 이름
├── category-types.enum.ts       # 카테고리 타입
├── group-names.enum.ts          # 그룹 이름
├── group-types.enum.ts          # 그룹 타입
├── recurring-day-of-week.enum.ts # 반복 요일
├── repeat-cycle-types.enum.ts   # 반복 주기
├── role-category-names.enum.ts  # 역할 카테고리
├── role-group-names.enum.ts     # 역할 그룹
├── session-types.enum.ts        # 세션 타입
└── index.ts                     # 통합 export

ts-jenum

이 패키지는 ts-jenum 라이브러리를 사용하여 Java 스타일의 강력한 Enum을 제공합니다:

import { Enum, EnumType } from 'ts-jenum';

@Enum('value')
export class SessionTypes extends EnumType<SessionTypes>() {
  static readonly PRIVATE = new SessionTypes('PRIVATE', '1:1 개인 수업');
  static readonly GROUP = new SessionTypes('GROUP', '그룹 수업');
  static readonly OPEN = new SessionTypes('OPEN', '오픈 수업');

  private constructor(
    readonly value: string,
    readonly description: string,
  ) {
    super();
  }
}

ts-jenum 장점

  • 타입 안정성
  • 추가 속성 지원 (description 등)
  • 메서드 추가 가능
  • 직렬화/역직렬화 지원

의존성

  • ts-jenum - Java 스타일 Enum 라이브러리