open-index/open-npm huggingface dataset:
npm package: @philippfromme/moddle-helpers
Description: Helpers for [moddle](https://github.com/bpmn-io/moddle).
Author: Philipp Fromme
Latest version: 0.4.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# moddle-helpers

Helpers for [moddle](https://github.com/bpmn-io/moddle).

# API

## `getPath`

```javascript
import { getPath } from '@philippfromme/moddle-helpers';

// global
getPath(moddleElement); // [ 'rootElements', 0, 'flowElements', 0, 'extensionElements', 'values', 0 ]

// local
getPath(moddleElement, parentModdleElement); // [ 'extensionElements', 'values', 0 ]

// $parent === undefined
const task = moddle.create('bpmn:Task');

getPath(task); // null

// null
getPath(null); // null
```

## `pathConcat`

```javascript
import { pathConcat } from '@philippfromme/moddle-helpers';

pathConcat([ 'foo', 'bar' ], 'baz'); // [ 'foo', 'bar', 'baz' ]

// null
pathConcat([ 'foo', 'bar' ], null); // null
```

## `pathEquals`

```javascript
import { pathEquals } from '@philippfromme/moddle-helpers';

// default separator
pathEquals('extensionElements.values.0.type', 'extensionElements.values.0.type'); // true

pathEquals([ 'extensionElements', 'values', 0 ], [ 'extensionElements', 'values', 0 ]); // true

// custom separator
pathEquals('extensionElements-values-0-type', 'extensionElements-values-0-type', '-'); // true

// null
pathEquals(null, [ 'foo' ]); // false
```

## `parsePath`

```javascript
import { parsePath } from '@philippfromme/moddle-helpers';

// default separator
parsePath('rootElements.0.flowElements.0.extensionElements.values.0.type'); // [ 'rootElements', 0, 'flowElements', 0, 'extensionElements', 'values', 0 ]

// custom separator
parsePath('rootElements-0-flowElements-0-extensionElements-values-0-type', '-'); // [ 'rootElements', 0, 'flowElements', 0, 'extensionElements', 'values', 0 ]

// null
parsePath(null); // null
```

## `stringifyPath`

```javascript
import { stringifyPath } from '@philippfromme/moddle-helpers';

// default separator
stringifyPath([ 'rootElements', 0, 'flowElements', 0, 'extensionElements', 'values', 0 ]); // 'rootElements.0.flowElements.0.extensionElements.values.0.type'

// custom separator
stringifyPath([ 'rootElements', 0, 'flowElements', 0, 'extensionElements', 'values', 0 ], '-'); // 'rootElements-0-flowElements-0-extensionElements-values-0-type'

// null
stringifyPath(null); // null
```

# Licence

MIT
npm package: @philippheuer/docusaurus-components
Description: A docusaurus v2 component library.
Author: Philipp Heuer
Latest version: 0.3.2

Docusaurus Component Library

![npm](https://img.shields.io/npm/v/@philippheuer/docusaurus-components)

=================================

A Docusaurus v2 component library for the default theme.

> Note: this theme plugin requires [Docusaurus v2](https://v2.docusaurus.io/)

## Components

- JavaDependency

## Install

```bash
yarn add @philippheuer/docusaurus-components
```

## Usage

Import the components on-demand in your .mdx files:

```tsx
import { JavaDependency } from '@philippheuer/docusaurus-components';

<JavaDependency group="com.github.twitch4j" name="twitch4j" version="1.11.0" scope="implementation" />
```

## License

Released under the [MIT License](./LICENSE).
npm package: @philippine-artists/nestjs-authentication
Description: <h1 align="center"></h1>
Author: Jan Schürmann
Latest version: 1.0.1

<h1 align="center"></h1>

<div align="center">
  <a href="http://nestjs.com/" target="_blank">
    <img src="https://nestjs.com/img/logo_text.svg" width="150" alt="Nest Logo" />
  </a>
</div>

<h3 align="center">NestJS npm Package Starter</h3>

<div align="center">
  <a href="https://nestjs.com" target="_blank">
    <img src="https://img.shields.io/badge/built%20with-NestJs-red.svg" alt="Built with NestJS">
  </a>
</div>

### Installation

1. Clone the repo
2. Run npm/yarn install

```bash
cd nestjs-package-starter
npm install
```

## Change Log

See [Changelog](CHANGELOG.md) for more information.

## Contributing

Contributions welcome! See [Contributing](CONTRIBUTING.md).

## Author

**John Biundo (Y Prospect on [Discord](https://discord.gg/G7Qnnhy))**

## License

Licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
npm package: @philiprehberger/api-error-kit
Description: Standardized typed HTTP error classes for APIs
Author: Philip Rehberger
Latest version: 0.1.8

# @philiprehberger/api-error-kit

[![CI](https://github.com/philiprehberger/ts-api-error-kit/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/ts-api-error-kit/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@philiprehberger/api-error-kit.svg)](https://www.npmjs.com/package/@philiprehberger/api-error-kit)
[![Last updated](https://img.shields.io/github/last-commit/philiprehberger/ts-api-error-kit)](https://github.com/philiprehberger/ts-api-error-kit/commits/main)

Standardized typed HTTP error classes for APIs

## Installation

```bash
npm install @philiprehberger/api-error-kit
```

## Usage

### Throwing Errors

```ts
import { ApiError, NotFoundError, BadRequestError } from '@philiprehberger/api-error-kit';

// Generic error with status code
throw new ApiError(404, 'User not found', { code: 'USER_NOT_FOUND' });

// Convenience subclasses
throw new NotFoundError('User not found');
throw new BadRequestError('Invalid email', { code: 'INVALID_EMAIL', details: { field: 'email' } });
```

### Serializing Errors

```ts
import { toErrorResponse } from '@philiprehberger/api-error-kit';

app.use((err, req, res, next) => {
  const response = toErrorResponse(err);
  res.status(response.status).json(response);
});

// ApiError → { status: 404, message: 'User not found', code: 'USER_NOT_FOUND' }
// Unknown  → { status: 500, message: 'Internal server error' }
```

### Type Guard

```ts
import { isApiError } from '@philiprehberger/api-error-kit';

if (isApiError(err)) {
  console.log(err.statusCode); // typed
}
```

## Error Classes

| Class | Status Code |
|-------|------------|
| `ApiError` | Any (first argument) |
| `BadRequestError` | 400 |
| `UnauthorizedError` | 401 |
| `ForbiddenError` | 403 |
| `NotFoundError` | 404 |
| `ConflictError` | 409 |
| `UnprocessableError` | 422 |
| `InternalError` | 500 |

## API

| Export | Description |
|--------|-------------|
| `ApiError` | Base error class with `statusCode`, `code`, `details` |
| `isApiError(err)` | Type guard — returns `true` if `err` is an `ApiError` |
| `toErrorResponse(err)` | Serializes any error to `ErrorResponse` object |

## Development

```bash
npm install
npm run build
npm test
```

## Support

If you find this project useful:

⭐ [Star the repo](https://github.com/philiprehberger/ts-api-error-kit)

🐛 [Report issues](https://github.com/philiprehberger/ts-api-error-kit/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

💡 [Suggest features](https://github.com/philiprehberger/ts-api-error-kit/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)

❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)

🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)

💻 [GitHub Profile](https://github.com/philiprehberger)

🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)

## License

[MIT](LICENSE)
npm package: @philiprehberger/async-queue
Description: Priority queue for async tasks with concurrency control
Author: Philip Rehberger
Latest version: 0.1.7

# @philiprehberger/async-queue

[![CI](https://github.com/philiprehberger/ts-async-queue/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/ts-async-queue/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@philiprehberger/async-queue.svg)](https://www.npmjs.com/package/@philiprehberger/async-queue)
[![Last updated](https://img.shields.io/github/last-commit/philiprehberger/ts-async-queue)](https://github.com/philiprehberger/ts-async-queue/commits/main)

Priority queue for async tasks with concurrency control

## Installation

```bash
npm install @philiprehberger/async-queue
```

## Usage

```ts
import { createQueue } from '@philiprehberger/async-queue';

const queue = createQueue({ concurrency: 2 });

queue.add(() => fetch('/api/one'));
queue.add(() => fetch('/api/two'));
queue.add(() => fetch('/api/urgent'), { priority: 10 });

await queue.onIdle();
console.log('All tasks complete');
```

### Pause and resume

```ts
queue.pause();
queue.add(() => fetch('/api/deferred'));
queue.resume(); // queued tasks start executing
```

### Abort signal

```ts
const controller = new AbortController();
const queue = createQueue({ concurrency: 3, signal: controller.signal });

queue.add(() => longRunningTask());
controller.abort(); // clears pending tasks
```

## API

| Export | Description |
| --- | --- |
| `createQueue(options?)` | Create a new async queue instance |
| `QueueOptions.concurrency` | Max concurrent tasks (default: `Infinity`) |
| `QueueOptions.signal` | `AbortSignal` to cancel the queue |
| `queue.add(fn, options?)` | Add a task; returns a promise for its result |
| `AddOptions.priority` | Higher number = higher priority (default: `0`) |
| `queue.pause()` | Pause task execution |
| `queue.resume()` | Resume task execution |
| `queue.clear()` | Reject and remove all pending tasks |
| `queue.onIdle()` | Promise that resolves when queue is idle |
| `queue.onEmpty()` | Promise that resolves when no pending tasks remain |
| `queue.size` | Number of pending tasks |
| `queue.running` | Number of currently running tasks |
| `queue.isPaused` | Whether the queue is paused |

## Development

```bash
npm install
npm run build
npm test
```

## Support

If you find this project useful:

⭐ [Star the repo](https://github.com/philiprehberger/ts-async-queue)

🐛 [Report issues](https://github.com/philiprehberger/ts-async-queue/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

💡 [Suggest features](https://github.com/philiprehberger/ts-async-queue/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)

❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)

🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)

💻 [GitHub Profile](https://github.com/philiprehberger)

🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)

## License

[MIT](LICENSE)
npm package: @philiprehberger/bit-flags
Description: Type-safe bitwise flag operations for permissions, features, and options
Author: Philip Rehberger
Latest version: 0.1.3

# @philiprehberger/bit-flags

[![CI](https://github.com/philiprehberger/ts-bit-flags/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/ts-bit-flags/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@philiprehberger/bit-flags.svg)](https://www.npmjs.com/package/@philiprehberger/bit-flags)
[![Last updated](https://img.shields.io/github/last-commit/philiprehberger/ts-bit-flags)](https://github.com/philiprehberger/ts-bit-flags/commits/main)

Type-safe bitwise flag operations for permissions, features, and options.

## Installation

```bash
npm install @philiprehberger/bit-flags
```

## Usage

```ts
import { defineFlags } from '@philiprehberger/bit-flags';

const permissions = defineFlags({
  read: 1,
  write: 2,
  execute: 4,
});

let flags = permissions.set(0, 'read', 'write'); // 3
permissions.has(flags, 'read'); // true
permissions.has(flags, 'execute'); // false

flags = permissions.toggle(flags, 'execute'); // 7
permissions.toArray(flags); // ['read', 'write', 'execute']
```

## API

### `defineFlags<F>(definition: F): FlagSet<F>`

Creates a type-safe flag set from a record of flag names to bit values.

### `FlagSet<F>`

- **`has(flags, flag)`** — Check if a flag is set
- **`set(flags, ...flagNames)`** — Set one or more flags
- **`unset(flags, ...flagNames)`** — Unset one or more flags
- **`toggle(flags, flag)`** — Toggle a flag on/off
- **`toArray(flags)`** — Get active flag names as an array
- **`fromArray(flagNames)`** — Combine flag names into a number
- **`all`** — All flags combined
- **`none`** — Zero value

## Development

```bash
npm install
npm run build
npm test
```

## Support

If you find this project useful:

⭐ [Star the repo](https://github.com/philiprehberger/ts-bit-flags)

🐛 [Report issues](https://github.com/philiprehberger/ts-bit-flags/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

💡 [Suggest features](https://github.com/philiprehberger/ts-bit-flags/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)

❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)

🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)

💻 [GitHub Profile](https://github.com/philiprehberger)

🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)

## License

[MIT](LICENSE)
npm package: @philiprehberger/color-kit
Description: Lightweight color parsing, conversion, and manipulation
Author: Philip Rehberger
Latest version: 0.1.5

# @philiprehberger/color-kit

[![CI](https://github.com/philiprehberger/ts-color-kit/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/ts-color-kit/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@philiprehberger/color-kit.svg)](https://www.npmjs.com/package/@philiprehberger/color-kit)
[![Last updated](https://img.shields.io/github/last-commit/philiprehberger/ts-color-kit)](https://github.com/philiprehberger/ts-color-kit/commits/main)

Lightweight color parsing, conversion, and manipulation

## Installation

```bash
npm install @philiprehberger/color-kit
```

## Usage

```ts
import { color } from '@philiprehberger/color-kit';

const c = color('#3b82f6');
c.lighten(20).toHex();       // lighter blue
c.opacity(0.5).toRGB();      // "rgba(59, 130, 246, 0.5)"
c.contrast(color('#ffffff')); // WCAG contrast ratio
c.isDark();                   // true
c.mix(color('#ef4444'), 0.5); // blended color
```

### Color Harmonies

```ts
color('#3b82f6').complementary(); // [Color]
color('#3b82f6').analogous();     // [Color, Color]
color('#3b82f6').triadic();       // [Color, Color]
```

## API

| Method | Description |
|--------|-------------|
| `color(input)` | Parse hex, rgb(), hsl(), or named color |
| `.toHex()` / `.toRGB()` / `.toHSL()` / `.toHSB()` | Convert |
| `.lighten(n)` / `.darken(n)` | Adjust lightness |
| `.saturate(n)` / `.desaturate(n)` | Adjust saturation |
| `.opacity(a)` / `.invert()` / `.grayscale()` | Transform |
| `.mix(other, ratio)` | Blend two colors |
| `.contrast(other)` | WCAG 2.1 contrast ratio |
| `.isLight()` / `.isDark()` | Luminance check |
| `.complementary()` / `.analogous()` / `.triadic()` | Harmonies |

## Development

```bash
npm install
npm run build
npm test
```

## Support

If you find this project useful:

⭐ [Star the repo](https://github.com/philiprehberger/ts-color-kit)

🐛 [Report issues](https://github.com/philiprehberger/ts-color-kit/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

💡 [Suggest features](https://github.com/philiprehberger/ts-color-kit/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)

❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)

🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)

💻 [GitHub Profile](https://github.com/philiprehberger)

🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)

## License

[MIT](LICENSE)
npm package: @philiprehberger/color-string
Description: Parse and stringify CSS color values — hex, rgb, hsl, and named colors
Author: Philip Rehberger
Latest version: 0.1.2

# @philiprehberger/color-string

[![CI](https://github.com/philiprehberger/ts-color-string/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/ts-color-string/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@philiprehberger/color-string.svg)](https://www.npmjs.com/package/@philiprehberger/color-string)
[![Last updated](https://img.shields.io/github/last-commit/philiprehberger/ts-color-string)](https://github.com/philiprehberger/ts-color-string/commits/main)

Parse and stringify CSS color values -- hex, rgb, hsl, and named colors.

## Installation

```bash
npm install @philiprehberger/color-string
```

## Usage

```ts
import { parse, toHex, toRgb, toHsl, isValid } from '@philiprehberger/color-string';

const color = parse('#ff0000');
// => { r: 255, g: 0, b: 0, a: 1 }

parse('rgb(255, 0, 0)');
// => { r: 255, g: 0, b: 0, a: 1 }

parse('hsl(0, 100%, 50%)');
// => { r: 255, g: 0, b: 0, a: 1 }

parse('red');
// => { r: 255, g: 0, b: 0, a: 1 }

toHex({ r: 255, g: 0, b: 0, a: 1 });
// => "#ff0000"

toRgb({ r: 255, g: 0, b: 0, a: 1 });
// => "rgb(255, 0, 0)"

toHsl({ r: 255, g: 0, b: 0, a: 1 });
// => "hsl(0, 100%, 50%)"

isValid('red');
// => true

isValid('notacolor');
// => false
```

## API

### `parse(str: string): Color | null`

Parse a CSS color string into a `Color` object. Supports hex (`#RGB`, `#RGBA`, `#RRGGBB`, `#RRGGBBAA`), `rgb()`/`rgba()`, `hsl()`/`hsla()`, and named colors.

### `toHex(color: Color): string`

Convert a `Color` to a hex string. Includes alpha channel if `a < 1`.

### `toRgb(color: Color): string`

Convert a `Color` to an `rgb()` or `rgba()` string.

### `toHsl(color: Color): string`

Convert a `Color` to an `hsl()` or `hsla()` string.

### `isValid(str: string): boolean`

Returns `true` if the string can be parsed as a valid CSS color.

### `Color`

```ts
interface Color {
  r: number; // 0-255
  g: number; // 0-255
  b: number; // 0-255
  a: number; // 0-1
}
```

## Development

```bash
npm install
npm run build
npm test
```

## Support

If you find this project useful:

⭐ [Star the repo](https://github.com/philiprehberger/ts-color-string)

🐛 [Report issues](https://github.com/philiprehberger/ts-color-string/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

💡 [Suggest features](https://github.com/philiprehberger/ts-color-string/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)

❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)

🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)

💻 [GitHub Profile](https://github.com/philiprehberger)

🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)

## License

[MIT](LICENSE)
npm package: @philiprehberger/cuid-ts
Description: Collision-resistant sortable unique IDs
Author: Philip Rehberger
Latest version: 0.1.3

# @philiprehberger/cuid-ts

[![CI](https://github.com/philiprehberger/cuid-ts/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/cuid-ts/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@philiprehberger/cuid-ts.svg)](https://www.npmjs.com/package/@philiprehberger/cuid-ts)
[![Last updated](https://img.shields.io/github/last-commit/philiprehberger/cuid-ts)](https://github.com/philiprehberger/cuid-ts/commits/main)

Collision-resistant sortable unique IDs for TypeScript

## Installation

```bash
npm install @philiprehberger/cuid-ts
```

## Usage

```ts
import { createId, createIdFactory, isCuid } from '@philiprehberger/cuid-ts';

// Generate a unique ID
const id = createId();
// => "clx8f0a3b00001k9z..."

// Generate with options
const customId = createId({ prefix: 'user', length: 32 });

// Create a pre-configured factory
const generateOrderId = createIdFactory({ prefix: 'ord', length: 28 });
const orderId = generateOrderId();

// Type guard
if (isCuid(someValue)) {
  // someValue is typed as Cuid
}
```

## API

| Export | Description |
| --- | --- |
| `createId(options?)` | Generate a collision-resistant sortable unique ID. Options: `prefix` (default `'c'`), `length` (default `24`), `fingerprint`. |
| `createIdFactory(options)` | Return a zero-argument function that generates IDs with the given options baked in. |
| `isCuid(value)` | Type guard that returns `true` if `value` matches the CUID format (starts with a lowercase letter, lowercase alphanumeric). |
| `Cuid` | Branded string type representing a valid CUID. |
| `CreateIdOptions` | Options interface: `prefix?: string`, `length?: number`, `fingerprint?: string`. |

## Development

```bash
npm install
npm run build
npm test
npm run typecheck
```

## Support

If you find this project useful:

⭐ [Star the repo](https://github.com/philiprehberger/cuid-ts)

🐛 [Report issues](https://github.com/philiprehberger/cuid-ts/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

💡 [Suggest features](https://github.com/philiprehberger/cuid-ts/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)

❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)

🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)

💻 [GitHub Profile](https://github.com/philiprehberger)

🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)

## License

[MIT](LICENSE)
npm package: @philiprehberger/deep-equal
Description: Fast deep equality comparison for JavaScript values with TypeScript type guards
Author: Philip Rehberger
Latest version: 0.1.3

# @philiprehberger/deep-equal

[![CI](https://github.com/philiprehberger/ts-deep-equal/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/ts-deep-equal/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@philiprehberger/deep-equal.svg)](https://www.npmjs.com/package/@philiprehberger/deep-equal)
[![Last updated](https://img.shields.io/github/last-commit/philiprehberger/ts-deep-equal)](https://github.com/philiprehberger/ts-deep-equal/commits/main)

Fast deep equality comparison for JavaScript values with TypeScript type guards.

## Installation

```bash
npm install @philiprehberger/deep-equal
```

## Usage

```ts
import { deepEqual } from '@philiprehberger/deep-equal';

deepEqual({ a: 1, b: [2, 3] }, { a: 1, b: [2, 3] }); // true
deepEqual(new Map([['x', 1]]), new Map([['x', 1]]));    // true
deepEqual(new Set([1, 2]), new Set([1, 2]));             // true

// Strict mode: Object.is semantics
deepEqual(NaN, NaN, { strict: true });  // true
deepEqual(-0, +0, { strict: true });    // false

// Circular reference support
const a: any = { x: 1 };
a.self = a;
const b: any = { x: 1 };
b.self = b;
deepEqual(a, b, { circular: true }); // true
```

## API

### `deepEqual(a: unknown, b: unknown, options?: DeepEqualOptions): boolean`

Performs a deep equality comparison between two values.

**Options:**

| Option     | Type      | Default | Description                                      |
| ---------- | --------- | ------- | ------------------------------------------------ |
| `strict`   | `boolean` | `false` | Use `Object.is` semantics (NaN, -0/+0 handling) |
| `circular` | `boolean` | `false` | Detect and handle circular references            |

**Supported types:** primitives, plain objects, arrays, `Date`, `RegExp`, `Map`, `Set`, `TypedArray`, `Error`, `BigInt`.

## Development

```bash
npm install
npm run build
npm test
```

## Support

If you find this project useful:

⭐ [Star the repo](https://github.com/philiprehberger/ts-deep-equal)

🐛 [Report issues](https://github.com/philiprehberger/ts-deep-equal/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

💡 [Suggest features](https://github.com/philiprehberger/ts-deep-equal/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)

❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)

🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)

💻 [GitHub Profile](https://github.com/philiprehberger)

🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)

## License

[MIT](LICENSE)
npm package: @philiprehberger/deep-merge-ts
Description: Type-safe deep merging of objects
Author: Philip Rehberger
Latest version: 0.1.4

# @philiprehberger/deep-merge-ts

[![CI](https://github.com/philiprehberger/deep-merge-ts/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/deep-merge-ts/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@philiprehberger/deep-merge-ts.svg)](https://www.npmjs.com/package/@philiprehberger/deep-merge-ts)
[![Last updated](https://img.shields.io/github/last-commit/philiprehberger/deep-merge-ts)](https://github.com/philiprehberger/deep-merge-ts/commits/main)

Type-safe deep merging of objects

## Installation

```bash
npm install @philiprehberger/deep-merge-ts
```

## Usage

```ts
import { deepMerge, deepMergeAll } from '@philiprehberger/deep-merge-ts';

const config = deepMerge(
  { server: { port: 3000, host: 'localhost' }, debug: false },
  { server: { port: 8080 }, debug: true },
);
// { server: { port: 8080, host: 'localhost' }, debug: true }
// Return type is fully inferred

const merged = deepMergeAll([base, env, runtime]);
```

### Array Strategies

```ts
deepMerge({ tags: ['a'] }, { tags: ['b'] });
// { tags: ['b'] } — default: replace

deepMerge({ tags: ['a'] }, { tags: ['b'] }, { arrayStrategy: 'concat' });
// { tags: ['a', 'b'] }

deepMerge({ tags: ['a', 'b'] }, { tags: ['b', 'c'] }, { arrayStrategy: 'union' });
// { tags: ['a', 'b', 'c'] }
```

## API

| Function | Description |
|----------|-------------|
| `deepMerge(target, source, options?)` | Deep merge two objects with type inference |
| `deepMergeAll(objects[], options?)` | Merge N objects left-to-right |
| `isPlainObject(value)` | Check if a value is a plain object |

## Development

```bash
npm install
npm run build
npm test
```

## Support

If you find this project useful:

⭐ [Star the repo](https://github.com/philiprehberger/deep-merge-ts)

🐛 [Report issues](https://github.com/philiprehberger/deep-merge-ts/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

💡 [Suggest features](https://github.com/philiprehberger/deep-merge-ts/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)

❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)

🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)

💻 [GitHub Profile](https://github.com/philiprehberger)

🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)

## License

[MIT](LICENSE)
npm package: @philiprehberger/diff-kit
Description: Object and array diffing with typed patches
Author: Philip Rehberger
Latest version: 0.1.5

# @philiprehberger/diff-kit

[![CI](https://github.com/philiprehberger/ts-diff-kit/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/ts-diff-kit/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@philiprehberger/diff-kit.svg)](https://www.npmjs.com/package/@philiprehberger/diff-kit)
[![Last updated](https://img.shields.io/github/last-commit/philiprehberger/ts-diff-kit)](https://github.com/philiprehberger/ts-diff-kit/commits/main)

Object and array diffing with typed patches

## Installation

```bash
npm install @philiprehberger/diff-kit
```

## Usage

```ts
import { diff, applyPatch, revertPatch, hasChanges, summarize } from '@philiprehberger/diff-kit';

const changes = diff(oldUser, newUser);
// [{ type: 'update', path: ['age'], oldValue: 30, newValue: 31 }]

const restored = revertPatch(newUser, changes); // equals oldUser
summarize(changes); // "Updated age"
hasChanges(a, b);   // true (fast)
```

## API

| Function | Description |
|----------|-------------|
| `diff(old, new, options?)` | Deep diff two objects |
| `applyPatch(obj, changes)` | Apply changes to an object |
| `revertPatch(obj, changes)` | Undo changes |
| `hasChanges(old, new)` | Quick boolean check |
| `summarize(changes)` | Human-readable summary |
| `diffArrays(old, new, { key })` | Diff arrays by identity key |

## Development

```bash
npm install
npm run build
npm test
```

## Support

If you find this project useful:

⭐ [Star the repo](https://github.com/philiprehberger/ts-diff-kit)

🐛 [Report issues](https://github.com/philiprehberger/ts-diff-kit/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

💡 [Suggest features](https://github.com/philiprehberger/ts-diff-kit/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)

❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)

🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)

💻 [GitHub Profile](https://github.com/philiprehberger)

🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)

## License

[MIT](LICENSE)
npm package: @philiprehberger/disposable-pool
Description: Generic async resource pool with acquire/release, validation, and auto-scaling
Author: Philip Rehberger
Latest version: 0.1.2

# @philiprehberger/disposable-pool

[![CI](https://github.com/philiprehberger/ts-disposable-pool/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/ts-disposable-pool/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@philiprehberger/disposable-pool.svg)](https://www.npmjs.com/package/@philiprehberger/disposable-pool)
[![Last updated](https://img.shields.io/github/last-commit/philiprehberger/ts-disposable-pool)](https://github.com/philiprehberger/ts-disposable-pool/commits/main)

Generic async resource pool with acquire/release, validation, and auto-scaling.

## Installation

```bash
npm install @philiprehberger/disposable-pool
```

## Usage

```ts
import { createPool } from '@philiprehberger/disposable-pool';

const pool = createPool({
  create: async () => await connectToDatabase(),
  destroy: async (conn) => await conn.close(),
  validate: async (conn) => conn.isAlive(),
  max: 10,
  acquireTimeout: 5000,
});

// Auto-release with withResource
const result = await pool.withResource(async (conn) => {
  return await conn.query('SELECT * FROM users');
});

// Manual acquire/release
const conn = await pool.acquire();
try {
  await conn.query('INSERT INTO logs ...');
} finally {
  pool.release(conn);
}

// Graceful shutdown
await pool.drain();
```

## API

### `createPool<T>(options: PoolOptions<T>): Pool<T>`

Creates a new resource pool.

#### `PoolOptions<T>`

- **`create`** — Factory function returning a new resource
- **`destroy`** — Cleanup function for a resource
- **`validate?`** — Check if a resource is still valid before reuse
- **`max?`** — Maximum pool size (default: `Infinity`)
- **`idleTimeout?`** — Destroy idle resources after this many ms
- **`acquireTimeout?`** — Reject acquire if waiting longer than this many ms

#### `Pool<T>`

- **`acquire()`** — Get a resource from the pool
- **`release(resource)`** — Return a resource to the pool
- **`withResource(fn)`** — Acquire, run fn, auto-release
- **`drain()`** — Destroy all resources and reject pending waiters
- **`size`** — Total resources (idle + active)
- **`available`** — Number of idle resources
- **`pending`** — Number of queued waiters

## Development

```bash
npm install
npm run build
npm test
```

## Support

If you find this project useful:

⭐ [Star the repo](https://github.com/philiprehberger/ts-disposable-pool)

🐛 [Report issues](https://github.com/philiprehberger/ts-disposable-pool/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

💡 [Suggest features](https://github.com/philiprehberger/ts-disposable-pool/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)

❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)

🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)

💻 [GitHub Profile](https://github.com/philiprehberger)

🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)

## License

[MIT](LICENSE)
npm package: @philiprehberger/enum
Description: Rich enums with methods labels and serialization
Author: Philip Rehberger
Latest version: 0.1.5

# @philiprehberger/enum

[![CI](https://github.com/philiprehberger/ts-enum/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/ts-enum/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@philiprehberger/enum.svg)](https://www.npmjs.com/package/@philiprehberger/enum)
[![Last updated](https://img.shields.io/github/last-commit/philiprehberger/ts-enum)](https://github.com/philiprehberger/ts-enum/commits/main)

Rich enums with methods, labels, and serialization

## Installation

```bash
npm install @philiprehberger/enum
```

## Usage

```ts
import { defineEnum, type EnumValue } from '@philiprehberger/enum';

const Status = defineEnum({
  ACTIVE:   { value: 'active',   label: 'Active' },
  INACTIVE: { value: 'inactive', label: 'Inactive' },
});

type Status = EnumValue<typeof Status>; // 'active' | 'inactive'

Status.ACTIVE;          // 'active' (literal type)
Status.label('active'); // 'Active'
Status.options();       // [{ value: 'active', label: 'Active' }, ...]
Status.parse('active'); // { ok: true, value: 'active' }
Status.is('active');    // true (type guard)
```

### Simple Enums

```ts
const Color = defineEnum({
  RED: 'red',
  GREEN: 'green',
  BLUE: 'blue',
});

Color.RED;       // 'red'
Color.values();  // ['red', 'green', 'blue']
```

## API

| Method | Description |
|--------|-------------|
| `defineEnum(definition)` | Create a frozen enum with methods |
| `.values()` | All enum values |
| `.keys()` | All enum keys |
| `.entries()` | Key-value pairs |
| `.parse(input)` | Safe parse with result type |
| `.label(value)` | Get display label |
| `.is(value)` | Type guard |
| `.options()` | `{ value, label }[]` for UI selects |
| `.meta(value)` | Get metadata for a value |

## Development

```bash
npm install
npm run build
npm test
```

## Support

If you find this project useful:

⭐ [Star the repo](https://github.com/philiprehberger/ts-enum)

🐛 [Report issues](https://github.com/philiprehberger/ts-enum/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

💡 [Suggest features](https://github.com/philiprehberger/ts-enum/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)

❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)

🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)

💻 [GitHub Profile](https://github.com/philiprehberger)

🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)

## License

[MIT](LICENSE)
npm package: @philiprehberger/glob-match
Description: Glob pattern matching — minimatch alternative for runtime use
Author: Philip Rehberger
Latest version: 0.1.3

# @philiprehberger/glob-match

[![CI](https://github.com/philiprehberger/ts-glob-match/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/ts-glob-match/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@philiprehberger/glob-match.svg)](https://www.npmjs.com/package/@philiprehberger/glob-match)
[![Last updated](https://img.shields.io/github/last-commit/philiprehberger/ts-glob-match)](https://github.com/philiprehberger/ts-glob-match/commits/main)

Glob pattern matching -- minimatch alternative for runtime use.

## Installation

```bash
npm install @philiprehberger/glob-match
```

## Usage

```ts
import { globMatch, globFilter, globToRegex } from '@philiprehberger/glob-match';

globMatch('*.ts', 'index.ts');
// => true

globMatch('src/**/*.ts', 'src/utils/helper.ts');
// => true

globMatch('*.{ts,js}', 'index.css');
// => false

globFilter('*.ts', ['index.ts', 'utils.ts', 'style.css']);
// => ['index.ts', 'utils.ts']

const regex = globToRegex('*.ts');
// => /^[^/]*\.ts$/
```

## API

### `globToRegex(pattern: string, options?: GlobOptions): RegExp`

Convert a glob pattern to a regular expression.

### `globMatch(pattern: string, str: string, options?: GlobOptions): boolean`

Test whether a string matches a glob pattern.

### `globFilter(pattern: string, strings: string[], options?: GlobOptions): string[]`

Filter an array of strings, returning only those that match the glob pattern.

### `GlobOptions`

| Option | Type | Default | Description |
|---|---|---|---|
| `caseSensitive` | `boolean` | `true` | Whether matching is case-sensitive |

### Supported Patterns

| Pattern | Description |
|---|---|
| `*` | Match any characters except `/` |
| `**` | Match any characters including `/` |
| `?` | Match a single character |
| `{a,b,c}` | Match any of the alternatives |
| `[abc]` | Match any character in the set |

## Development

```bash
npm install
npm run build
npm test
```

## Support

If you find this project useful:

⭐ [Star the repo](https://github.com/philiprehberger/ts-glob-match)

🐛 [Report issues](https://github.com/philiprehberger/ts-glob-match/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

💡 [Suggest features](https://github.com/philiprehberger/ts-glob-match/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)

❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)

🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)

💻 [GitHub Profile](https://github.com/philiprehberger)

🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)

## License

[MIT](LICENSE)
npm package: @philiprehberger/guard
Description: Runtime type guard utilities with TypeScript narrowing
Author: Philip Rehberger
Latest version: 0.1.5

# @philiprehberger/guard

[![CI](https://github.com/philiprehberger/ts-guard/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/ts-guard/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@philiprehberger/guard.svg)](https://www.npmjs.com/package/@philiprehberger/guard)
[![Last updated](https://img.shields.io/github/last-commit/philiprehberger/ts-guard)](https://github.com/philiprehberger/ts-guard/commits/main)

Runtime type guard utilities with TypeScript narrowing

## Installation

```bash
npm install @philiprehberger/guard
```

## Usage

```ts
import { isString, isNumber, isArrayOf, isObjectWith, assert } from '@philiprehberger/guard';

if (isString(val)) {
  val.toUpperCase(); // narrowed to string
}

const isUser = isObjectWith({
  name: isString,
  age: isNumber,
});

if (isUser(data)) {
  data.name; // typed as string
  data.age;  // typed as number
}

assert(input, isArrayOf(isString)); // throws or narrows to string[]
```

### Composing Guards

```ts
import { isOneOf, isString, isNumber, isTupleOf } from '@philiprehberger/guard';

const isStringOrNumber = isOneOf(isString, isNumber);
const isPair = isTupleOf(isString, isNumber);

isStringOrNumber('hello'); // true
isPair(['hello', 42]);     // true
```

## API

| Function | Description |
|----------|-------------|
| `isString`, `isNumber`, `isBoolean`, `isNull`, `isUndefined`, `isNil`, `isBigInt`, `isSymbol` | Primitive guards |
| `isArray`, `isObject`, `isPlainObject`, `isMap`, `isSet`, `isDate`, `isRegExp`, `isError`, `isPromise`, `isFunction` | Structural guards |
| `isNonEmpty`, `isPositive`, `isNegative`, `isInteger`, `isFiniteNumber`, `isNonNullish` | Value guards |
| `isOneOf(...guards)` | Union of guards |
| `isArrayOf(guard)` | Array where all items match guard |
| `isObjectWith(shape)` | Object matching shape of guards |
| `isTupleOf(...guards)` | Tuple matching guards positionally |
| `assert(value, guard, message?)` | Throw if guard fails, narrow otherwise |

## Development

```bash
npm install
npm run build
npm test
```

## Support

If you find this project useful:

⭐ [Star the repo](https://github.com/philiprehberger/ts-guard)

🐛 [Report issues](https://github.com/philiprehberger/ts-guard/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

💡 [Suggest features](https://github.com/philiprehberger/ts-guard/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)

❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)

🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)

💻 [GitHub Profile](https://github.com/philiprehberger)

🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)

## License

[MIT](LICENSE)
npm package: @philiprehberger/hash-kit
Description: Simple cross-platform hashing utilities
Author: Philip Rehberger
Latest version: 0.1.5

# @philiprehberger/hash-kit

[![CI](https://github.com/philiprehberger/ts-hash-kit/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/ts-hash-kit/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@philiprehberger/hash-kit.svg)](https://www.npmjs.com/package/@philiprehberger/hash-kit)
[![Last updated](https://img.shields.io/github/last-commit/philiprehberger/ts-hash-kit)](https://github.com/philiprehberger/ts-hash-kit/commits/main)

Simple cross-platform hashing utilities

## Installation

```bash
npm install @philiprehberger/hash-kit
```

## Usage

```ts
import { hash } from '@philiprehberger/hash-kit';

const checksum = hash.murmur3('cache-key');            // sync, fast
const digest = await hash.sha256('hello');              // cross-platform
const sig = await hash.hmac(secret, payload, 'SHA-256'); // HMAC
```

## API

| Function | Description |
|----------|-------------|
| `hash.murmur3(input, seed?)` | MurmurHash3 (sync) |
| `hash.sha256(input)` | SHA-256 via Web Crypto |
| `hash.sha512(input)` | SHA-512 via Web Crypto |
| `hash.hmac(key, data, algorithm?)` | HMAC signing |
| `toHex(buffer)` | ArrayBuffer to hex string |
| `toUint8Array(input)` | String to Uint8Array |

## Development

```bash
npm install
npm run build
npm test
```

## Support

If you find this project useful:

⭐ [Star the repo](https://github.com/philiprehberger/ts-hash-kit)

🐛 [Report issues](https://github.com/philiprehberger/ts-hash-kit/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

💡 [Suggest features](https://github.com/philiprehberger/ts-hash-kit/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)

❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)

🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)

💻 [GitHub Profile](https://github.com/philiprehberger)

🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)

## License

[MIT](LICENSE)
npm package: @philiprehberger/http-error
Description: Typed HTTP error classes with status codes, factory methods, and serialization
Author: Philip Rehberger
Latest version: 0.1.2

# @philiprehberger/http-error

[![CI](https://github.com/philiprehberger/ts-http-error/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/ts-http-error/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@philiprehberger/http-error.svg)](https://www.npmjs.com/package/@philiprehberger/http-error)
[![Last updated](https://img.shields.io/github/last-commit/philiprehberger/ts-http-error)](https://github.com/philiprehberger/ts-http-error/commits/main)

Typed HTTP error classes with status codes, factory methods, and serialization.

## Installation

```bash
npm install @philiprehberger/http-error
```

## Usage

```ts
import { HttpError, isHttpError } from '@philiprehberger/http-error';

// Factory methods
throw HttpError.notFound('User not found');
throw HttpError.badRequest('Invalid email');
throw HttpError.internal();

// Constructor
throw new HttpError(409, 'Already exists', { code: 'DUPLICATE' });

// Type guard
try {
  await fetchUser(id);
} catch (err) {
  if (isHttpError(err, 404)) {
    // handle not found
  }
}

// Serialization
const err = HttpError.badRequest('Invalid input');
console.log(JSON.stringify(err));
// {"status":400,"message":"Invalid input","code":"ERR_HTTP_400"}
```

## API

### `new HttpError(status, message?, options?)`

Creates an HTTP error instance.

| Param              | Type      | Description                          |
| ------------------ | --------- | ------------------------------------ |
| `status`           | `number`  | HTTP status code                     |
| `message`          | `string`  | Error message (defaults by status)   |
| `options.code`     | `string`  | Machine-readable code                |
| `options.cause`    | `unknown` | Underlying cause                     |

### Factory Methods

`badRequest`, `unauthorized`, `forbidden`, `notFound`, `conflict`, `gone`, `unprocessable`, `tooMany`, `internal`, `notImplemented`, `badGateway`, `unavailable`

### `isHttpError(err): err is HttpError`
### `isHttpError(err, status): err is HttpError`

Type guard that checks if a value is an `HttpError`, optionally matching a specific status code.

### `toJSON(): { status, message, code }`

Serializes the error for API responses.

## Development

```bash
npm install
npm run build
npm test
```

## Support

If you find this project useful:

⭐ [Star the repo](https://github.com/philiprehberger/ts-http-error)

🐛 [Report issues](https://github.com/philiprehberger/ts-http-error/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

💡 [Suggest features](https://github.com/philiprehberger/ts-http-error/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)

❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)

🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)

💻 [GitHub Profile](https://github.com/philiprehberger)

🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)

## License

[MIT](LICENSE)
npm package: @philiprehberger/http-status
Description: Typed HTTP status codes, reason phrases, and classification
Author: Philip Rehberger
Latest version: 0.1.5

# @philiprehberger/http-status

[![CI](https://github.com/philiprehberger/ts-http-status/actions/workflows/ci.yml/badge.svg)](https://github.com/philiprehberger/ts-http-status/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@philiprehberger/http-status.svg)](https://www.npmjs.com/package/@philiprehberger/http-status)
[![Last updated](https://img.shields.io/github/last-commit/philiprehberger/ts-http-status)](https://github.com/philiprehberger/ts-http-status/commits/main)

Typed HTTP status codes, reason phrases, and classification helpers for TypeScript

## Installation

```bash
npm install @philiprehberger/http-status
```

## Usage

```ts
import {
  Status,
  reasonPhrase,
  isSuccess,
  isRetryable,
  statusRange,
} from "@philiprehberger/http-status";

Status.OK; // 200
Status.NOT_FOUND; // 404

reasonPhrase(200); // "OK"
reasonPhrase(404); // "Not Found"

isSuccess(200); // true
isRetryable(503); // true
statusRange(404); // "4xx"
```

## API

| Export | Description |
| --- | --- |
| `Status` | Object with all common HTTP status codes as literal-typed constants |
| `reasonPhrase(status)` | Returns the reason phrase string for a status code |
| `isInformational(status)` | `true` for 100-199 |
| `isSuccess(status)` | `true` for 200-299 |
| `isRedirect(status)` | `true` for 300-399 |
| `isClientError(status)` | `true` for 400-499 |
| `isServerError(status)` | `true` for 500-599 |
| `statusRange(status)` | Returns `"1xx"` \| `"2xx"` \| `"3xx"` \| `"4xx"` \| `"5xx"` |
| `isRetryable(status)` | `true` for 408, 429, 500, 502, 503, 504 |
| `StatusCode` | Type union of all status code number literals |

## Development

```bash
npm install
npm run build
npm run typecheck
npm test
```

## Support

If you find this project useful:

⭐ [Star the repo](https://github.com/philiprehberger/ts-http-status)

🐛 [Report issues](https://github.com/philiprehberger/ts-http-status/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

💡 [Suggest features](https://github.com/philiprehberger/ts-http-status/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)

❤️ [Sponsor development](https://github.com/sponsors/philiprehberger)

🌐 [All Open Source Projects](https://philiprehberger.com/open-source-packages)

💻 [GitHub Profile](https://github.com/philiprehberger)

🔗 [LinkedIn Profile](https://www.linkedin.com/in/philiprehberger)

## License

[MIT](LICENSE)