- Introduce the
Isomodule for isomorphic bijections.- Add
Iso.String.Charsto wrap the process of iterating over chars. - Add
Iso.String.Wordsto wrap the process of iterating over words. - Add
Iso.NaturalNumber.Incrementto wrap the process of incrementing a number. - Add
Iso.NaturalNumber.Decrementto wrap the process of decrementing a number. - Add
Iso.NaturalNumber.Digitsto wrap the process of converting a natural number to a list of digits.
- Add
- Add
Object.DeepEntriesto get all deep paths and values in an object. - Add
Object.FromEntriesto create an object from a list of key-value pairs. - Add
Object.IsObjectto check if a value is an object. - Reify
NaturalNumber.DivideByto a value-level function. - Reify
NaturalNumber.Divideto a value-level function. - Reify
NaturalNumber.IsEvento a value-level function. - Reify
NaturalNumber.IsOddto a value-level function. - Add
NaturalNumber.Undigitsto convert a list of digits to a natural number. - Reify
String.FirstandString.Lastto value-level functions. - Reify
String.InitandString.Tailto value-level functions. - Add
String.Unwordsto join a list of strings with a space delimiter. - Add
String.RepeatByto repeat a string by a given number (argument swapped).
- Fix
List.Sortto work with 2-ary comparators.
- Fix packaging issue.
- Reify
NaturalNumber.ModuloandNaturalNumber.ModuloByto value-level functions. - Reify
Number.Negateto a value-level function. - Reify
List.Zip. - Add
Integer.Negate. - Add
List.SortandList.SortBy. - Reify
String.StartsWithandString.EndsWithto value-level functions. - Add
Object.PickByValue. - Reify
Type.Displayto an identity function. - Improve pipe performance.
- Reify
List.Intersect. - Add
List.SubtractandList.SubtractBy. - Add
Kind.ApplyKind. - Reify
List.Unshift,List.FlatMap, andList.Times. - Add
String.CompareandString.CompareChar. - Add
List.Comparefor comparing lists. - Reify
Number.Compareto a value-level function. - Add
Type.TypeOfas a kind for emulating thetypeofoperator. - Add
List.UniqueByfor getting unique values from a list and mapping. - Reify
Number.IsIntegerto a value-level function. - Add
String.Repeatfor repeating a string. - Add
List.CartesianProductfor generating all possible combinations of elements. - Fix edge condition in
String.Joininvolving empty values.
- Reify
String.ToListto a value-level function. - Add
List.FindIndexto find the index of a value in a list that satisfies a predicate. - Add
List.IndexOfto find the index of a value in a list. - Add
List.StartsWithto check if a list starts with a sequence of values. - Add
List.EndsWithto check if a list ends with a sequence of values. - Add
List.IndexOfSequenceto find the index of a sequence of values in a list. - Fix runtime list search utilities to search via deep equality.
- Add
List.Replaceto replace all instances of a value in a list with another value. - Add
List.Removeto remove all instances of a value from a list. - Add
List.ReplaceSequenceto replace all instances of a sequence of values in a list with another sequence. - Add
List.RemoveSequenceto remove all instances of a sequence of values from a list. - Fix
NaturalNumber.decrementto return zero when decrementing zero during runtime. - Add
Combinator.Fixto find a fixed point of a higher-order type. - Reify
List.MinByto a value-level function. - Add
List.MaxIndexByto find the index of the maximum element in a list according to a scoring function. - Add
List.MinIndexByto find the index of the minimum element in a list according to a scoring function. - Add
List.RemoveIndexto remove an element at a specified index from a list. - Reify
List.Reduceto a value-level function. - Reify
List.Someto a value-level function. - Reify
List.Findto a value-level function.
- Add
String.CamelCaseto convert a string to camelCase. - Add
String.PascalCaseto convert a string to PascalCase. - Add
String.SnakeCaseto convert a string to snake_case. - Add
String.KebabCaseto convert a string to kebab-case. - Add
String.ConstantCaseto convert a string to CONSTANT_CASE. - Reify
String.Capitalizeto a value-level function. - Add
String.Wordsto split a string into words. - Add
String.IsUppercaseLetterto check if a string is uppercase. - Add
String.IsLowercaseLetterto check if a string is lowercase. - Add
String.IsDigitto check if a string is a digit.
- Reify
NaturalNumber.Addto a value-level function. - Add
Kind.JuxtNto juxt kinds with an arity of greater than one. - Add
NaturalNumber.FromHexto convert a hexadecimal string to a decimal number. - Add
NaturalNumber.ToHexto convert a decimal number to a hexadecimal string. - Reify
String.FromListto a value-level function. - Add
List.PadStartto pad a list to a desired length with a padding value. - Add
List.PadEndto pad a list to a desired length with a padding value. - Add
String.PadStartto pad a string to a desired length with a padding character. - Add
String.PadEndto pad a string to a desired length with a padding character. - Improve inference efficiency of
List.CollateandKind.LazyPipe.
- Add
List.Countto create a frequency map from a list. - Add
List.Sameto check if all elements in a list are equal. - Add
Object.AtPathInObjectto get the value at a path in an object. - Reify
Object.AtPathto a value-level function. - Add
Object.Defaultsto initialize an object with default values. - Add
Object.Omitto remove keys from an object. - Add
Object.Pickto pick keys from an object. - Reify
Object.Valuesto a value-level function. - Reify
List.SliceandList.Spliceto value-level functions. - Add arg-swapped
List.SliceListandList.SpliceListutilities. - Add
List.Entriesto get the entries of a list as a list of 2-tuples. - Add
String.Entriesto get the entries of a string as a list of 2-tuples. - Add
Kind.Collapseto convert an n-arity kind to a 1-arity kind.
- Add
NaturalNumber.Digitsto get the digits of a natural number. - Add
List.Ofto create a list containing a single value. - Add
List.SlidingWindowto 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.FromCharCodeto convert a character code to a string. - Add
String.IsLetterto check if a string is a letter. - Add
String.ToCharCodeto convert a string to a character code. - Reify
String.Splitto a value-level function. - Reify
String.ToLowerto a value-level function. - Reify
NaturalNumber.SubtractByto a value-level function. - Reify
NaturalNumber.Subtractto a value-level function. - Reify
List.Filterto a value-level function.
- Add
NaturalNumber.Squareto compute the square of a natural number. - Add
Object.AtKeyto get the value at a key in an object. (swapped argument order ofObject.At) - Modify
Conditional.equalsto perform deep equality. - Add various value-level implementations.
- Add various value-level implementations across
List,NaturalNumber,String, andType. - Add
Type.Neverto represent thenevertype.
- Add
List.IsEmptyto check if a list is empty. - Add
List.Taketo take the first N elements of a list. - Add
List.TransformAtto transform the element at a given index in a list. - Add
List.UnshiftValueto unshift a value onto a list. - Add
Kind.LazyPipeto apply a list of kinds lazily, i.e. allow intermediate currying. - Add
Boolean.ToNumberto convert a boolean to a number, i.e. 1 or 0. - Modify
List.Atto return the union of all elements in a list if givennumberas an index.
- Fix
List.CountByto gracefully handle variadics.
- Add
List.CountByto count the number of elements in a list that satisfy a predicate. - Add
Object.Entriesto get the entries of an object. - Add
Object.Assignto assign a value to a key in an object. - Add
List.MaxByandList.MinByto find the maximum or minimum element in a list that satisfies a predicate. - Add various value-level implementations.
- Add various
Kindutilities:- Add
Kind.Juxtfor performing multiple calculations on a single input. - Add
Kind.PipeWeakfor a more flexible pipe operation with less checks.
- Add
- Add various
Listutilities:- Add
List.Chunkfor chunking lists into specified sizes of sublists. - Add
List.Duplicatesto identify duplicate values in a list. - Add
List.FlatMapthat maps over a kind and flattens the result one level. - Add
List.IncludesValueas an argument swap ofList.Includes. - Add
List.Intersectto get common elements between two lists. - Add
List.PushValueas an argument swap ofList.Push. - Add
List.Removeto filter out every instance of a value from a list. - Add
List.Uniqueto return a list with all duplicate elements removed.
- Add
- Add new
Loopmodule with an initialLoop.Untilutility. - Add new
Matrixmodule for dealing with two-dimensional arrays:- Add
Matrix.Chunkto chunk a matrix into a list of matrices. - Add
Matrix.Columnsto get the columns of a matrix. - Add
Matrix.Combineto combine to merge a matrix of matrices into a single matrix. - Add
Matrix.Rowsto get the rows of a matrix. - Add
Matrix.Sliceto slice a matrix to get a submatrix using four indices.
- Add
- Add new
Typeutilities for intersection and union types:- Add
Type.Intersectto get the intersection of two types. - Add
Type.Unionto get the union of two types. - Add
Type.IntersectAllto get the intersection of all types in a tuple. - Add
Type.UnionAllto get the union of all types in a tuple.
- Add
- Add various
Objectutilities for object manipulation. - [Breaking] Swap argument order of
List.Repeatto match documentation. - [Breaking] Change
List.Includesto take in direct value (sinceList.Somealready exists).
- Add
Type.Assertutility 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.Rangeedge case semantics.
- Add additional JSDoc annotations for some modules. (
Union,Type,Kind)
- Add
String.Capitalizeutility for capitalizing the first letter of a string.
- Add various conditional 'variadic' utilities:
- Add
Conditional.EqualsAllfor checking if every type in a list is equal. - Add
Conditional.ExtendsAllfor performing composite subtype checks.
- Add
- Add
Union.FromListfor 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.Negatefor integer negation. - Add
Number.MaxandNumber.Minfor binary max/min operations. - Add
Number.MAX_SAFE_INTEGERandNumber.MIN_SAFE_INTEGERconstants.
- Add
- Add
NaturalNumber.SubtractByfor argument-swapped subtraction. - [Breaking] Improve
List.Slice,List.Splice, andList.Unshiftinterfaces.
- Add support for negative start indices in
List.Splice.
- Improve ability to compose type-level functions
- Add
$Noperator for uncurried type-level function application. - Add
Kind.CurryandKind.Uncurryto support argument lifting.
- Add
- Add various natural number operations:
- Add
NaturalNumber.ModuloBywith swapped arguments. - Add
NaturalNumber.IsLessThan.
- Add
- Add
Combinator.Collatefor theoretical / pedagogical purposes. - Add
NaturalNumberTheory.Factorial. - Add
NaturalNumberTheory.FizzBuzzandNaturalNumberTheory.FizzBuzzSequence.
- Add
DigitList.FromStringfor parsing digit lists from strings. - Add
Number.Comparefor type-level numeric comparison.
- Add various advanced
Listmethods.- Add
Concat,Repeat,ShiftN,PopN,Slice,Splice,Flatten - Add
FlattenN,DigitList.ToNumber
- Add
- [Breaking] Rename prior
List.Sliceutility toList.ShiftN.
- Make
String.Joinmore composable with other list types.
- Improve
NaturalNumber.MultiplyandCombinator.FixSequenceperformance.
- Add
Kind.Reifyfor reifying a higher-order type to a value-level type. - Add
Type.Inferfor inferring a narrow type in a parameter context.
- [Breaking] Complete overhaul of all modules, more consistent
$usage.
- Add
NaturalNumber.Comparefor comparing natural numbers.
- Add various numeric comparison types.
- Add
DigitList.Comparefor comparing digit list magnitude. - Add
Digit.Comparefor comparing single-digit magnitude.
- Add
- Add various parser combinators.
- Add
Parser.Many1for parsing one or more elements. - Add
Parser.Optionalfor parsing an optional element.
- Add
- Introduce
Stressmodule for common stress-testing types.
- Introduce various other
Parsercombinators.- Add
Parser.Runfor state management. - Add
Parser.Mapfor mapping over the result of a parser. - Add
Parser.LetterandParser.Lettersfor parsing letters. - Add
Parser.ObjectSequencefor better result extraction.
- Add
- Add
Object.EmplaceandObject.Mergemethods. - Increase performance of various string and list utilities.
- Introduce
Parsermodule for parser combinators.- Add
Parser.Stringfor parsing string literals. - Add
Parser.Choicefor parsing alternatives. - Add
Parser.Sequencefor parsing sequences.
- Add
- Add
List.Slice<N>method, to remove the first N elements from a list. - Add
String.Slicemethod.
- Fix division bug that led to rare incorrect results for
NaturalNumber.Divide.
- Introduce
NaturalNumberTheorymodule for abstract natural number theory.- Add
NaturalNumberTheory.Collatz - Add
NaturalNumberTheory.CollatzSequencefor generating hailstorm numbers.
- Add
- Add
Combinator.FixSequencefor fixed-point iteration of a sequence. - Add
NaturalNumber.DivideBy, for argument swapping ofNaturalNumber.Divide.
- Fix
String.Joinbug that did not properly handle one-tuple elements.
- Add
List.Lengthmethod. - Add
List.Timesmethod, which constructs the tuple from 0 to N - 1. - Add
NaturalNumber.DivideandNaturalNumber.Modulomethods. - Add
NaturalNumber.IsEvenandNaturalNumber.IsOddmethods. - Add various digit-list level division methods.
- Add
NaturalNumber.Multiplymethod. - [Breaking] Change return type of natural arithmetic to numbers instead of strings.
- Add
NaturalNumber.IncrementandNaturalNumber.Decrementmethods. - Add
NaturalNumber.Subtractmethod.
- Add
List.Reducemethod.
- Add
Number,NaturalNumber,Digit, andDigitListmodules. - Add
Type.IsNevermethod. - Add
Union.Lengthmethod.
- [Breaking] Switch default package export from '$' to entire module.
- [Breaking] Remove deprecated
Conditional.SubtypeOfin favor ofConditional.Extends. - [Breaking] Remove
Kindnamespace-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.ToUpperandString.ToLowermethods. - Add
Object.MapKeysandObject.MapValuesmethods.
- Add
Conditional.Ifhk-type for type-level control flow. - Add
String.IsStringhk-level predicate. - Add
Type,Union, andObjectcore components.
- Fix a type resolution issue for
Conditional.Extendshk-type. - Strengthen hk-level type check for
Combinator.ApplySelfhk-type. - Optimize string and list utilities via tail-call optimization.
- Introduce
Conditional.Extendsutility type. - Deprecate alias
Conditional.SubtypeOfin favor ofConditional.Extends.
- Add
String.Tail,String.Init, andString.Reversehk-types.
- Optimize string splitting routine in
String.IsTemplateusing tail-call optimization. - Add
String.FirstandString.Lastkinds.
- Publish updated npm readme.
- Add
String.Join,String.Split, andString.IsTemplatekinds. - Add
List.IsVariadickind.
- Fix bug with
Test.Expectin checking equality between twonevertypes. - 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.Orfor||HKT-level operator. - Add
Combinator.SelfandCombinator.ApplySelfcombinators. - Add
Kind.Pipeleft-to-right composition. - Add
List.First,List.Some,List.Reversetuple utilities. - Improve
Test.Expecterror messages to use ᛰ for strict type equality.
- Add
String.AppendandString.Prependtypes. - Improve
Test.Expectbehavior and error messages.
- Rename
Kind.InputtoKind.InputOfandKind.OutputtoKind.OutputOf.
- Add HKT-level composability check for
Kind.Compose.
- First experimental release.
- Introduce
Boolean,Cast,Conditional,Function,Kind,List,String, andTestcore components.