2.0.1 • Published 2 years ago

tr-utilities-lib v2.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Tom Raaff's utilities library

Not meant for use in Production. This is a personal library and is maintained to fit my own needs.

Publishing notes

  • modify the prepublishOnly script for the version major | minor | patch
  • Publish npm publish (will automatically run prepare and prepublishOnly first)

Installation

Run npm install tr-utilities-lib

Contents:

  • Collection
  • Maybe
  • Either
  • MergeObjects
  • VerifyType
  • Component

Collection

Basically an Array on steroids. See implementation

Maybe

warning: probably buggy Also known as Option or Optional. It might contain a value. If not, it forces the user to handle the empty-scenario gracefully. See implementation

Either

warning: probably buggy Meant to contain a happy-flow-response (called Right) or an unhappy-flow-response (called Left). See implementation

MergeObjects

Meant to merge objects where all fields of the second object will overwrite fields of the first object. Includes nesting and arrays. Does not support multi-dimensional arrays yet.

ValidateType

Meant for runtime validation of incoming objects over http. Whenever you do an HTTP-request, you cannot know for certain what comes in, so you'd better validate in runtime.

1.7.9

2 years ago

1.7.10

2 years ago

1.7.8

2 years ago

1.7.11

2 years ago

1.7.7

2 years ago

1.7.6

2 years ago

1.7.5

2 years ago

2.0.1

2 years ago

1.7.0

3 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.3.2

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago