All Projects β†’ OctoD β†’ tiinvo

OctoD / tiinvo

Licence: MIT license
Functions for tacit programming and functional types for TypeScript and JavaScript.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to tiinvo

monas
πŸ¦‹ Scala monads for javascript
Stars: ✭ 21 (-41.67%)
Mutual labels:  monad, option, either
ts-belt
πŸ”§ Fast, modern, and practical utility library for FP in TypeScript.
Stars: ✭ 439 (+1119.44%)
Mutual labels:  monad, option, result
either option
A small typed and safe library for error handling with functionnal programming concept in Dart and flutter project
Stars: ✭ 34 (-5.56%)
Mutual labels:  option, result, either
rust-error-handle
detail rust error handle
Stars: ✭ 47 (+30.56%)
Mutual labels:  option, result
Mostly Adequate Guide Chinese
ε‡½ζ•°εΌηΌ–η¨‹ζŒ‡εŒ—δΈ­ζ–‡η‰ˆ
Stars: ✭ 2,093 (+5713.89%)
Mutual labels:  monad, functional-js
common
A minimal library that defines primitive building blocks of PHP code.
Stars: ✭ 28 (-22.22%)
Mutual labels:  option, result
J-Curry
A Java library that enables applying Functional Programming concepts like currying and partial application for functions, also it supports types like Either, Try, etc... using RxJava 2 interfaces, compatible with Java 7 and above
Stars: ✭ 17 (-52.78%)
Mutual labels:  monad, either
apropos
Fast strong typed 'Either' data structure for typescript and flow
Stars: ✭ 20 (-44.44%)
Mutual labels:  monad, either
either
Elm Either
Stars: ✭ 24 (-33.33%)
Mutual labels:  result, either
Functional Examples
Examples with Functional JavaScript, following Professor Frisby's course
Stars: ✭ 179 (+397.22%)
Mutual labels:  monad
Each
A macro library that converts native imperative syntax to scalaz's monadic expressions
Stars: ✭ 245 (+580.56%)
Mutual labels:  monad
Fpgo
Monad, Functional Programming features for Golang
Stars: ✭ 165 (+358.33%)
Mutual labels:  monad
Mtl
The Monad Transformer Library
Stars: ✭ 252 (+600%)
Mutual labels:  monad
Swift Adventures In Monad Land
A Swift adventure with Optionals, Monads, bananas and squirrels
Stars: ✭ 166 (+361.11%)
Mutual labels:  monad
functional-structures-refactoring-kata
Starting code and proposed solution for Functional Structures Refactoring Kata
Stars: ✭ 31 (-13.89%)
Mutual labels:  monad
Burrido
Do-notation for JavaScript
Stars: ✭ 150 (+316.67%)
Mutual labels:  monad
Functional Promises
Write code like a story w/ a powerful Fluent (function chaining) API
Stars: ✭ 141 (+291.67%)
Mutual labels:  monad
Design-Patterns
Project for learning and discuss about design patterns
Stars: ✭ 16 (-55.56%)
Mutual labels:  monad
Monadless
Syntactic sugar for monad composition in Scala
Stars: ✭ 231 (+541.67%)
Mutual labels:  monad
Dsl.scala
A framework to create embedded Domain-Specific Languages in Scala
Stars: ✭ 220 (+511.11%)
Mutual labels:  monad

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

Install

You can install it using npm

npm i tiinvo

Or with yarn

yarn add tiinvo

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

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

Licence

Read the licence

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].