- Reify
String.ToList
to a value-level function. - Add
List.FindIndex
to find the index of a value in a list that satisfies a predicate. - Add
List.IndexOf
to find the index of a value in a list. - Add
List.StartsWith
to check if a list starts with a sequence of values. - Add
List.EndsWith
to check if a list ends with a sequence of values. - Add
List.IndexOfSequence
to find the index of a sequence of values in a list. - Fix runtime list search utilities to search via deep equality.
- Add
List.Replace
to replace all instances of a value in a list with another value. - Add
List.Remove
to remove all instances of a value from a list. - Add
List.ReplaceSequence
to replace all instances of a sequence of values in a list with another sequence. - Add
List.RemoveSequence
to remove all instances of a sequence of values from a list. - Fix
NaturalNumber.decrement
to return zero when decrementing zero during runtime. - Add
Combinator.Fix
to find a fixed point of a higher-order type. - Reify
List.MinBy
to a value-level function. - Add
List.MaxIndexBy
to find the index of the maximum element in a list according to a scoring function. - Add
List.MinIndexBy
to find the index of the minimum element in a list according to a scoring function. - Add
List.RemoveIndex
to remove an element at a specified index from a list. - Reify
List.Reduce
to a value-level function. - Reify
List.Some
to a value-level function. - Reify
List.Find
to a value-level function.
- Add
String.CamelCase
to convert a string to camelCase. - Add
String.PascalCase
to convert a string to PascalCase. - Add
String.SnakeCase
to convert a string to snake_case. - Add
String.KebabCase
to convert a string to kebab-case. - Add
String.ConstantCase
to convert a string to CONSTANT_CASE. - Reify
String.Capitalize
to a value-level function. - Add
String.Words
to split a string into words. - Add
String.IsUppercaseLetter
to check if a string is uppercase. - Add
String.IsLowercaseLetter
to check if a string is lowercase. - Add
String.IsDigit
to check if a string is a digit.
- Reify
NaturalNumber.Add
to a value-level function. - Add
Kind.JuxtN
to juxt kinds with an arity of greater than one. - Add
NaturalNumber.FromHex
to convert a hexadecimal string to a decimal number. - Add
NaturalNumber.ToHex
to convert a decimal number to a hexadecimal string. - Reify
String.FromList
to a value-level function. - Add
List.PadStart
to pad a list to a desired length with a padding value. - Add
List.PadEnd
to pad a list to a desired length with a padding value. - Add
String.PadStart
to pad a string to a desired length with a padding character. - Add
String.PadEnd
to pad a string to a desired length with a padding character. - Improve inference efficiency of
List.Collate
andKind.LazyPipe
.
- Add
List.Count
to create a frequency map from a list. - Add
List.Same
to check if all elements in a list are equal. - Add
Object.AtPathInObject
to get the value at a path in an object. - Reify
Object.AtPath
to a value-level function. - Add
Object.Defaults
to initialize an object with default values. - Add
Object.Omit
to remove keys from an object. - Add
Object.Pick
to pick keys from an object. - Reify
Object.Values
to a value-level function. - Reify
List.Slice
andList.Splice
to value-level functions. - Add arg-swapped
List.SliceList
andList.SpliceList
utilities. - Add
List.Entries
to get the entries of a list as a list of 2-tuples. - Add
String.Entries
to get the entries of a string as a list of 2-tuples. - Add
Kind.Collapse
to convert an n-arity kind to a 1-arity kind.
- Add
NaturalNumber.Digits
to get the digits of a natural number. - Add
List.Of
to create a list containing a single value. - Add
List.SlidingWindow
to slide a window of a certain length over a list. - Reify various natural number utilities.
- Reify various string and list utilities.
- Fix statefulness bug in reified
List.collate
.
- Add
String.FromCharCode
to convert a character code to a string. - Add
String.IsLetter
to check if a string is a letter. - Add
String.ToCharCode
to convert a string to a character code. - Reify
String.Split
to a value-level function. - Reify
String.ToLower
to a value-level function. - Reify
NaturalNumber.SubtractBy
to a value-level function. - Reify
NaturalNumber.Subtract
to a value-level function. - Reify
List.Filter
to a value-level function.
- Add
NaturalNumber.Square
to compute the square of a natural number. - Add
Object.AtKey
to get the value at a key in an object. (swapped argument order ofObject.At
) - Modify
Conditional.equals
to perform deep equality. - Add various value-level implementations.
- Add various value-level implementations across
List
,NaturalNumber
,String
, andType
. - Add
Type.Never
to represent thenever
type.
- Add
List.IsEmpty
to check if a list is empty. - Add
List.Take
to take the first N elements of a list. - Add
List.TransformAt
to transform the element at a given index in a list. - Add
List.UnshiftValue
to unshift a value onto a list. - Add
Kind.LazyPipe
to apply a list of kinds lazily, i.e. allow intermediate currying. - Add
Boolean.ToNumber
to convert a boolean to a number, i.e. 1 or 0. - Modify
List.At
to return the union of all elements in a list if givennumber
as an index.
- Fix
List.CountBy
to gracefully handle variadics.
- Add
List.CountBy
to count the number of elements in a list that satisfy a predicate. - Add
Object.Entries
to get the entries of an object. - Add
Object.Assign
to assign a value to a key in an object. - Add
List.MaxBy
andList.MinBy
to find the maximum or minimum element in a list that satisfies a predicate. - Add various value-level implementations.
- Add various
Kind
utilities:- Add
Kind.Juxt
for performing multiple calculations on a single input. - Add
Kind.PipeWeak
for a more flexible pipe operation with less checks.
- Add
- Add various
List
utilities:- Add
List.Chunk
for chunking lists into specified sizes of sublists. - Add
List.Duplicates
to identify duplicate values in a list. - Add
List.FlatMap
that maps over a kind and flattens the result one level. - Add
List.IncludesValue
as an argument swap ofList.Includes
. - Add
List.Intersect
to get common elements between two lists. - Add
List.PushValue
as an argument swap ofList.Push
. - Add
List.Remove
to filter out every instance of a value from a list. - Add
List.Unique
to return a list with all duplicate elements removed.
- Add
- Add new
Loop
module with an initialLoop.Until
utility. - Add new
Matrix
module for dealing with two-dimensional arrays:- Add
Matrix.Chunk
to chunk a matrix into a list of matrices. - Add
Matrix.Columns
to get the columns of a matrix. - Add
Matrix.Combine
to combine to merge a matrix of matrices into a single matrix. - Add
Matrix.Rows
to get the rows of a matrix. - Add
Matrix.Slice
to slice a matrix to get a submatrix using four indices.
- Add
- Add new
Type
utilities for intersection and union types:- Add
Type.Intersect
to get the intersection of two types. - Add
Type.Union
to get the union of two types. - Add
Type.IntersectAll
to get the intersection of all types in a tuple. - Add
Type.UnionAll
to get the union of all types in a tuple.
- Add
- Add various
Object
utilities for object manipulation. - [Breaking] Swap argument order of
List.Repeat
to match documentation. - [Breaking] Change
List.Includes
to take in direct value (sinceList.Some
already exists).
- Add
Type.Assert
utility for strict type assertions.
- Add support for TypeScript v5.4.2.
- Improve performance for division-based operations.
- Add
DigitList._$signedAdd
, for efficient signed addition using digit lists. - [Breaking] Improve
List.Range
edge case semantics.
- Add additional JSDoc annotations for some modules. (
Union
,Type
,Kind
)
- Add
String.Capitalize
utility for capitalizing the first letter of a string.
- Add various conditional 'variadic' utilities:
- Add
Conditional.EqualsAll
for checking if every type in a list is equal. - Add
Conditional.ExtendsAll
for performing composite subtype checks.
- Add
- Add
Union.FromList
for constructing a union from a list of types. - Add list utilities:
- Add
List.At
,List.Accumulate
,List.Iterate
,List.Zip
. - Add
List.Range
, for generating ranges of numbers.
- Add
- Add various number utilities:
- Add
Number.Negate
for integer negation. - Add
Number.Max
andNumber.Min
for binary max/min operations. - Add
Number.MAX_SAFE_INTEGER
andNumber.MIN_SAFE_INTEGER
constants.
- Add
- Add
NaturalNumber.SubtractBy
for argument-swapped subtraction. - [Breaking] Improve
List.Slice
,List.Splice
, andList.Unshift
interfaces.
- Add support for negative start indices in
List.Splice
.
- Improve ability to compose type-level functions
- Add
$N
operator for uncurried type-level function application. - Add
Kind.Curry
andKind.Uncurry
to support argument lifting.
- Add
- Add various natural number operations:
- Add
NaturalNumber.ModuloBy
with swapped arguments. - Add
NaturalNumber.IsLessThan
.
- Add
- Add
Combinator.Collate
for theoretical / pedagogical purposes. - Add
NaturalNumberTheory.Factorial
. - Add
NaturalNumberTheory.FizzBuzz
andNaturalNumberTheory.FizzBuzzSequence
.
- Add
DigitList.FromString
for parsing digit lists from strings. - Add
Number.Compare
for type-level numeric comparison.
- Add various advanced
List
methods.- Add
Concat
,Repeat
,ShiftN
,PopN
,Slice
,Splice
,Flatten
- Add
FlattenN
,DigitList.ToNumber
- Add
- [Breaking] Rename prior
List.Slice
utility toList.ShiftN
.
- Make
String.Join
more composable with other list types.
- Improve
NaturalNumber.Multiply
andCombinator.FixSequence
performance.
- Add
Kind.Reify
for reifying a higher-order type to a value-level type. - Add
Type.Infer
for inferring a narrow type in a parameter context.
- [Breaking] Complete overhaul of all modules, more consistent
$
usage.
- Add
NaturalNumber.Compare
for comparing natural numbers.
- Add various numeric comparison types.
- Add
DigitList.Compare
for comparing digit list magnitude. - Add
Digit.Compare
for comparing single-digit magnitude.
- Add
- Add various parser combinators.
- Add
Parser.Many1
for parsing one or more elements. - Add
Parser.Optional
for parsing an optional element.
- Add
- Introduce
Stress
module for common stress-testing types.
- Introduce various other
Parser
combinators.- Add
Parser.Run
for state management. - Add
Parser.Map
for mapping over the result of a parser. - Add
Parser.Letter
andParser.Letters
for parsing letters. - Add
Parser.ObjectSequence
for better result extraction.
- Add
- Add
Object.Emplace
andObject.Merge
methods. - Increase performance of various string and list utilities.
- Introduce
Parser
module for parser combinators.- Add
Parser.String
for parsing string literals. - Add
Parser.Choice
for parsing alternatives. - Add
Parser.Sequence
for parsing sequences.
- Add
- Add
List.Slice<N>
method, to remove the first N elements from a list. - Add
String.Slice
method.
- Fix division bug that led to rare incorrect results for
NaturalNumber.Divide
.
- Introduce
NaturalNumberTheory
module for abstract natural number theory.- Add
NaturalNumberTheory.Collatz
- Add
NaturalNumberTheory.CollatzSequence
for generating hailstorm numbers.
- Add
- Add
Combinator.FixSequence
for fixed-point iteration of a sequence. - Add
NaturalNumber.DivideBy
, for argument swapping ofNaturalNumber.Divide
.
- Fix
String.Join
bug that did not properly handle one-tuple elements.
- Add
List.Length
method. - Add
List.Times
method, which constructs the tuple from 0 to N - 1. - Add
NaturalNumber.Divide
andNaturalNumber.Modulo
methods. - Add
NaturalNumber.IsEven
andNaturalNumber.IsOdd
methods. - Add various digit-list level division methods.
- Add
NaturalNumber.Multiply
method. - [Breaking] Change return type of natural arithmetic to numbers instead of strings.
- Add
NaturalNumber.Increment
andNaturalNumber.Decrement
methods. - Add
NaturalNumber.Subtract
method.
- Add
List.Reduce
method.
- Add
Number
,NaturalNumber
,Digit
, andDigitList
modules. - Add
Type.IsNever
method. - Add
Union.Length
method.
- [Breaking] Switch default package export from '$' to entire module.
- [Breaking] Remove deprecated
Conditional.SubtypeOf
in favor ofConditional.Extends
. - [Breaking] Remove
Kind
namespace-class merging in favor ofKind.Kind
. - Add support for deep subpath imports.
- e.g.
import { StartsWith } from "hkt-toolbelt/string/starts-with"
- e.g.
- Add
String.ToUpper
andString.ToLower
methods. - Add
Object.MapKeys
andObject.MapValues
methods.
- Add
Conditional.If
hk-type for type-level control flow. - Add
String.IsString
hk-level predicate. - Add
Type
,Union
, andObject
core components.
- Fix a type resolution issue for
Conditional.Extends
hk-type. - Strengthen hk-level type check for
Combinator.ApplySelf
hk-type. - Optimize string and list utilities via tail-call optimization.
- Introduce
Conditional.Extends
utility type. - Deprecate alias
Conditional.SubtypeOf
in favor ofConditional.Extends
.
- Add
String.Tail
,String.Init
, andString.Reverse
hk-types.
- Optimize string splitting routine in
String.IsTemplate
using tail-call optimization. - Add
String.First
andString.Last
kinds.
- Publish updated npm readme.
- Add
String.Join
,String.Split
, andString.IsTemplate
kinds. - Add
List.IsVariadic
kind.
- Fix bug with
Test.Expect
in checking equality between twonever
types. - Publish improved docs on npm.
- Allow alternative subpath imports, e.g.
hkt-toolbelt/string
.
- Fix internal import paths and build process for package types.
- Add shorthand
$$
pipe-application operator. - Add
Boolean.Or
for||
HKT-level operator. - Add
Combinator.Self
andCombinator.ApplySelf
combinators. - Add
Kind.Pipe
left-to-right composition. - Add
List.First
,List.Some
,List.Reverse
tuple utilities. - Improve
Test.Expect
error messages to use ᛰ for strict type equality.
- Add
String.Append
andString.Prepend
types. - Improve
Test.Expect
behavior and error messages.
- Rename
Kind.Input
toKind.InputOf
andKind.Output
toKind.OutputOf
.
- Add HKT-level composability check for
Kind.Compose
.
- First experimental release.
- Introduce
Boolean
,Cast
,Conditional
,Function
,Kind
,List
,String
, andTest
core components.