JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 21200
  • Score
    100M100P100Q138598F
  • License MIT

Essential utilities for TypeScript projects

Package Exports

  • ts-extras

Readme

ts-extras

Essential utilities for TypeScript projects

Still early in development. Ideas for additional essential utilities welcome. Type-only utilities belong in type-fest.

Install

npm install ts-extras

Usage

import {isDefined} from 'ts-extras';

[1, null, 2, undefined].filter(isDefined);
//=> [1, 2]

API

See the source for now. Proper docs will come at some point.

FAQ

What is the difference between this and type-fest?

The type-fest package contains only types, meaning they are only used at compile-time and nothing is ever compiled into actual JavaScript code. This package contains functions that are compiled into JavaScript code and used at runtime.

  • type-fest - A collection of essential TypeScript types