1.3.1 • Published 2 years ago

@northtech/ginnungagap v1.3.1

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

ginnungagap

... is the formless void before all else

These are stand-alone TypeScript utilities, not depending on any frameworks. (In other words, this is the "utils" kitchensink).

Undefined Handling

is heavily inspired by Guava's Preconditions, and null-handling in Strings, but also contains TypeScript-specific narrowing guards.

Comparison

has null-aware comparison, and can be used to build a comparator which compares multiple fields in objects. It also sorts embedded numbers (integers) according to their numeric value; not their lexical order, so, say, A2: Something sorts before A10: Other.

TrigramIndex

is a fuzzy search algorithm for in-memory arrays of objects. This is very effective for something like filtering lists on a couple of keystrokes, quickly narrowing down a selection.
If you need more full-featured text search, consider something like https://lunrjs.com/.

Arrays

contains a shuffle function to randomize an array (correctly).

Usage

Install with

npm install @northtech/ginnungagap@^1.3

TypeDocs at https://doc.northtech.dk/ginnungagap/

1.3.1

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.2.0

5 years ago

1.2.0-beta.1

5 years ago

1.1.0

6 years ago

1.0.1-beta.1

6 years ago

1.0.0

6 years ago

1.0.0-rc.1

6 years ago

1.0.0-rc.0

6 years ago