Skip to content

typescript-toolkit 2.0.0

Install from the command line:
Learn more about npm packages
$ npm install @peerigon/typescript-toolkit@2.0.0
Install via package.json:
"@peerigon/typescript-toolkit": "2.0.0"

About this version

typescript-toolkit

πŸ”§βœ¨ Tiny helpers for TypeScript applications

Version on NPM Version on JSR Semantically released Monthly downloads on NPM License

Small, focused utilities you import one at a time β€” tree-shakeable ES modules with subpath exports.

Features

  • 🎯 High-quality module design
  • ⚑ Lightweight sub-package exports
  • πŸ“¦ Tree-shakeable ES modules

Installation

npm install @peerigon/typescript-toolkit --save

Also available on JSR.

Usage

Import only the utilities you need. Each one is exposed as its own subpath:

import { assert } from "@peerigon/typescript-toolkit/assert";

Utilities

Module Description Docs
assert Assert a value is not null or undefined, with TypeScript narrowing β†’
need Assert a value is not null or undefined and return it with a narrowed type β†’
dedupe Remove duplicate values from an array while preserving first-occurrence order β†’
enums Lightweight string-enum alternative for erasableSyntaxOnly TypeScript projects β†’
match Exhaustive pattern matching with compile-time case checks, similar to switch β†’

License

MIT

Sponsors

Peerigon

Details


Assets

  • typescript-toolkit-2.0.0.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0