0.0.0-alpha.3 • Published 4 months ago

@kozderka/railway v0.0.0-alpha.3

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

Railway oriented programming in TypeScript

Introduction

Package includes types, interfaces and functions for support of railway oriented programming.

Installation

npm install @kozderka/railway

Documentation

Table of Contents

Success

Type: Object

Properties

  • tag "success"
  • value T

Failure

Type: Object

Properties

  • tag "failure"
  • error T

Result

Type: (Success\ | Failure\)

success

Parameters

  • value T

Returns Success\

failure

Parameters

  • error T

Returns Failure\

isSuccess

Parameters

Returns boolean

isFailure

Parameters

Returns boolean

getValue

Parameters

Returns T

map

Parameters

  • f function (any): any

Returns function (any): Success\

chain

Parameters

  • f function (any): any

Returns function (any): any

tee

Parameters

  • f function (any): any

Returns function (Result\<T, U>): Result\<T, U>

0.0.0-alpha.3

4 months ago

0.0.0-alpha.2

8 months ago

0.0.0-alpha.1

9 months ago

0.0.0-alpha.0

9 months ago