Skip to content

digimuza/ts-prime

 
 

Repository files navigation

alt text

The utility library designed for TypeScript.

Build Status npm module dependencies

Links

Online documentation - here

Test coverage report - here

Installation

npm i ts-prime
yarn add ts-prime

Then in .js or .ts

import * as P from "ts-prime"; // tree-shaking supported!

Why ts-prime?

There are no universal utility libraries that fits my development need. Most of the development libraries did had function that I needed in day to day development.

ts-prime Design Goals

  1. The usage must be programmer-friendly, and that's more important than following the XYZ paradigm strictly.
  2. Manual annotation should never be required, and proper typings should infer everything. The only exception is the first function in createPipe.
  3. E6 polyfill is required. Core methods are reused, and data structure (like Map/Set) are not re-implemented.
  4. The implementation of each function should be as minimal as possible. Tree-shaking is supported by default. (Do you know that lodash.keyBy has 14KB after minification?)
  5. All functions are immutable, and there are no side-effects.
  6. Fixed number of arguments.
  7. Designed with typescript limitations in mind

MIT

Packages

No packages published

Languages

  • TypeScript 99.3%
  • Other 0.7%