# tiinvo

> A library of types and utilities for your TypeScript and JavaScript projects

Latest version **4.0.0-rc3** (published 2023-07-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install tiinvo
pnpm add tiinvo
yarn add tiinvo
bun add tiinvo
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0-rc3 |
| Published | 2023-07-17 |
| First published | 2019-07-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 401.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 41 |
| Author | Paolo Roth |
| Maintainers | octod |
| Keywords | array, functional programming, functions, functors, monads, number, option, pipe, predicate, sequence, string, tuple, typed sequence, types, utility |

## Links

- npm: https://www.npmjs.com/package/tiinvo
- Repository: https://github.com/octod/tiinvo
- Issues: https://github.com/octod/tiinvo/issues
- npm.io page: https://npm.io/package/tiinvo

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 4.0.0-rc3 (latest) — 2023-07-17
- 4.0.0-rc2 — 2023-03-02
- 4.0.0-rc1 — 2022-12-15
- 3.9.0 — 2022-10-04
- 3.8.1 — 2022-09-11
- 3.8.0 — 2022-08-29
- 3.7.2 — 2022-08-29
- 3.7.1 — 2022-08-29
- 3.7.0 — 2022-06-30
- 3.6.1 — 2022-06-27
- 3.6.0 — 2022-03-29
- 3.5.4 — 2022-03-28
- 3.5.3 — 2022-03-28
- 3.5.2 — 2022-03-10
- 3.5.1 — 2022-03-10
- … 77 more at https://npm.io/package/tiinvo/versions

## README

<div align="center">
  <img src="https://raw.githubusercontent.com/OctoD/tiinvo/master/banner-readme.png" height="160"/>
</div>

tiinvo
=======

An opinionated lib of types and utilities for your TypeScript and JavaScript projects which aims to add missing functionalities to standard Js and replace other.

[docs](docs/modules.md)

- [tiinvo](#tiinvo)
- [Install](#install)
- [Features](#features)
- [Usage](#usage)
- [Contributing](#contributing)
- [Licence](#licence)

# Install

You can install it using npm

```bash
npm i tiinvo
```

Or with yarn

```bash
yarn add tiinvo
```

or if you are using Deno, you have to simply import it

```ts
import { Arr, Option, Result } from 'https://cdn.skypack.dev/tiinvo?dts';
```

# Features

This library is 

- Simple
- Intuitive
- Lightweight
- Pragmatic
- Safe
- Side-effect free and fully tree-shakeable
- Versatile
- Battle-tested (used in dozens of production projects)
- Well-documented (every type, function and function overload is documented properly)
- Well-maintained
- Well-tested

This library is ideal for both an imperative and declarative approach, since every function
is overloaded and can be used without the need to use curry (I love it for cooking, not for coding).

It normalizes several native JavaScript methods (like string, number and array).

# Usage

This library provides several new data types like 

- `DateRange` which is a reliable way to generate date ranges.
- `Option` which handles gracefully values which could be both null or undefined.
- `Predicate` are used to determine truthyness.
- `Range` is used to generate a numeric range.
- `Result` handles errors gracefully.
- `Sequence` is an immutable sequence of elements.
- `SortedSequence` is a sorted immutable sequence of elements.
- `Tuple` is a tuple.
- `TypedMap` is a typed immutable Map of elements.
- `TypedSequence` is a typed immutable sequence of elements.
  
wraps native types

- `Arr` handles all array methods, adding new ones.
- `BigInt` handles all bigint methods, adding new ones.
- `Bool` handles all boolean methods, adding new ones.
- `Fn` handles all function methods, adding new ones.
- `Num` handles all number methods, adding new ones.
- `Obj` handles all object methods, adding new ones.
- `Str` handles all string methods, adding new ones.

and adds utility functions

- `Assert` used to create assertions.
- `Catch` used to catch gracefully functions which could throw an error.
- `Pipe` concatenates many unary functions in one, great for function composition.

# Contributing

Every contribution is really welcome!

If you feel that something can be improved or should be fixed, feel free to open an issue with the feature or the bug found.

Pull requests are really welcome!

- Create a new branch from `main` 
- open your PR
- enjoy!

Read the [contributing guidelines](./CONTRIBUTING.md)

# Licence

Read the [licence](./LICENCE)

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