0.3.3 • Published 9 months ago

@pacote/non-empty-array v0.3.3

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

@pacote/non-empty-array

version minified minified + gzip

An array type guaranteed to have at least one element.

The module consumes and returns plain JavaScript arrays, but is typed to prevent the TypeScript compiler from handling arrays that might be empty.

One instance where non-empty arrays are useful is when combined with @pacote/result to create a Validation data type that accumulates multiple errors as Result<T, NonEmptyArray<Error>>. This is because a failing computation must have at least one error.

Installation

yarn add @pacote/non-empty-array

License

MIT © Luís Rodrigues.

0.3.3

9 months ago

0.3.2

2 years ago

0.3.0

2 years ago

0.3.1

2 years ago

0.2.4

3 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago