# smody-library

> 스모디의 유용한 메타 타입 모음 라이브러리

Latest version **1.1.1** (published 2022-10-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install smody-library
pnpm add smody-library
yarn add smody-library
bun add smody-library
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2022-10-30 |
| First published | 2022-09-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Marco, Ronci, Victor |
| Maintainers | marco-won, woose28, ronci |
| Keywords | typescript, tsd, test |

## Links

- npm: https://www.npmjs.com/package/smody-library
- npm.io page: https://npm.io/package/smody-library

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2022-10-30
- 1.1.0 — 2022-09-28
- 1.0.8 — 2022-09-27
- 1.0.7 — 2022-09-27
- 1.0.6 — 2022-09-27
- 1.0.5 — 2022-09-27
- 1.0.4 — 2022-09-27
- 1.0.3 — 2022-09-27
- 1.0.2 — 2022-09-27
- 1.0.1 — 2022-09-27
- 1.0.0 — 2022-09-27

## README

<p align="middle" >
  <img src="https://techcourse-storage.s3.ap-northeast-2.amazonaws.com/49031e8eef91405f824a0438ac1b0059" width="600">
</p>

## 🚀 smody util library

- 소개

  - 스모디 프로젝트에서 사용되는 범용 타입 모듈입니다.
  - `MappedKeyToUnion`, `PickType` 메타 타입을 제공합니다.

- 설치

```bash
npm install smody-library --save-dev
```

- 실행

MappedKeyToUnion
```tsx
import { MappedKeyToUnion } from 'smody-library';

const COLOR = {
  LIGHT_PURPLE: '#F5F3FF',
  PURPLE: '#7B61FF',
  DARK_PURPLE: '#7054FE',
} as const;

type AvailablePickedColor = MappedKeyToUnion<typeof COLOR>;
// => type AvailablePickedColor = "#F5F3FF" | "#7B61FF" | "#7054FE";
```

PickType
```tsx
import { PickType } from 'smody-library';

type Person = {
  name: string;
  age: number;
}

type PickedName = PickType<Person, 'name'>
// => PickedName type is string

type PickedAge = PickType<Person, 'age'>
// => PickedAge type is number
```

- [smody 유틸 npm 라이브러리 주소](https://www.npmjs.com/package/smody-library)
- [smody 프로젝트 구경가기](https://www.smody.co.kr)
- [smody 프로젝트 git 저장소](https://github.com/woowacourse-teams/2022-smody)

---
_Source: https://npm.io/package/smody-library · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
