Default implementations for neotype_prelude equivalence relations, total orders, and semigroups for built-in JavaScript objects
This library provides default implementations for the neotype_prelude Eq
,
Ord
, and Semigroup
interfaces for built-in JavaScript objects and their
corresponding TypeScript definitions, including:
boolean
, number
, bigint
, string
, and symbol
Array
and ReadonlyArray
readonly
tuple literalsSet
and ReadonlySet
Map
and ReadonlyMap
The specific implementations are:
Type | Eq |
Ord |
Semigroup |
---|---|---|---|
Array |
✓ | ✓ | ✓ |
BigInt |
✓ | ✓ | |
BigInt64Array |
✓ | ✓ | ✓ |
BigUint64Array |
✓ | ✓ | ✓ |
Boolean |
✓ | ✓ | |
Date |
✓ | ✓ | |
Float32Array |
✓ | ✓ | ✓ |
Float64Array |
✓ | ✓ | ✓ |
Function |
✓ | ||
Int8Array |
✓ | ✓ | ✓ |
Int16Array |
✓ | ✓ | ✓ |
Int32Array |
✓ | ✓ | ✓ |
Map |
✓ | ✓ | |
Number |
✓ | ✓ | |
Promise |
✓ | ||
readonly tuple literal |
✓ | ✓ | |
ReadonlyArray |
✓ | ✓ | ✓ |
ReadonlyMap |
✓ | ✓ | |
ReadonlySet |
✓ | ✓ | |
Set |
✓ | ✓ | |
String |
✓ | ✓ | ✓ |
Symbol |
✓ | ||
tuple literal | ✓ | ✓ | |
Uint8Array |
✓ | ✓ | ✓ |
Uint8ClampedArray |
✓ | ✓ | ✓ |
Uint16Array |
✓ | ✓ | ✓ |
Uint32Array |
✓ | ✓ | ✓ |
neotype_extensions is available on NPM.
npm install @neotype/extensions @neotype/prelude
This library provides a suite of ES6 modules. A .js
suffix is required in
all import statements. There are no exports. When imported, each module will
augment a global object.
import "@neotype/extensions/boolean.js";
import "@neotype/extensions/number.js";
import "@neotype/extensions/promise.js";
import "@neotype/extensions/string.js";
// etc.
See each module's documentation for recommended import practices.
Generated using TypeDoc