hkt-toolbelt
Advanced tools
Changelog
[0.26.0]
Iso
module for isomorphic bijections.
Iso.String.Chars
to wrap the process of iterating over chars.Iso.String.Words
to wrap the process of iterating over words.Iso.NaturalNumber.Increment
to wrap the process of incrementing a number.Iso.NaturalNumber.Decrement
to wrap the process of decrementing a number.Iso.NaturalNumber.Digits
to wrap the process of converting a natural number to a list of digits.Object.DeepEntries
to get all deep paths and values in an object.Object.FromEntries
to create an object from a list of key-value pairs.Object.IsObject
to check if a value is an object.NaturalNumber.DivideBy
to a value-level function.NaturalNumber.Divide
to a value-level function.NaturalNumber.IsEven
to a value-level function.NaturalNumber.IsOdd
to a value-level function.NaturalNumber.Undigits
to convert a list of digits to a natural number.String.First
and String.Last
to value-level functions.String.Init
and String.Tail
to value-level functions.String.Unwords
to join a list of strings with a space delimiter.String.RepeatBy
to repeat a string by a given number (argument swapped).Changelog
[0.25.0]
NaturalNumber.Modulo
and NaturalNumber.ModuloBy
to value-level functions.Number.Negate
to a value-level function.List.Zip
.Integer.Negate
.List.Sort
and List.SortBy
.String.StartsWith
and String.EndsWith
to value-level functions.Object.PickByValue
.Type.Display
to an identity function.List.Intersect
.List.Subtract
and List.SubtractBy
.Kind.ApplyKind
.List.Unshift
, List.FlatMap
, and List.Times
.String.Compare
and String.CompareChar
.List.Compare
for comparing lists.Number.Compare
to a value-level function.Type.TypeOf
as a kind for emulating the typeof
operator.List.UniqueBy
for getting unique values from a list and mapping.Number.IsInteger
to a value-level function.String.Repeat
for repeating a string.List.CartesianProduct
for generating all possible combinations of elements.String.Join
involving empty values.Changelog
[0.24.11]
String.ToList
to a value-level function.List.FindIndex
to find the index of a value in a list that satisfies a predicate.List.IndexOf
to find the index of a value in a list.List.StartsWith
to check if a list starts with a sequence of values.List.EndsWith
to check if a list ends with a sequence of values.List.IndexOfSequence
to find the index of a sequence of values in a list.List.Replace
to replace all instances of a value in a list with another value.List.Remove
to remove all instances of a value from a list.List.ReplaceSequence
to replace all instances of a sequence of values in a list with another sequence.List.RemoveSequence
to remove all instances of a sequence of values from a list.NaturalNumber.decrement
to return zero when decrementing zero during runtime.Combinator.Fix
to find a fixed point of a higher-order type.List.MinBy
to a value-level function.List.MaxIndexBy
to find the index of the maximum element in a list according to a scoring function.List.MinIndexBy
to find the index of the minimum element in a list according to a scoring function.List.RemoveIndex
to remove an element at a specified index from a list.List.Reduce
to a value-level function.List.Some
to a value-level function.List.Find
to a value-level function.Changelog
[0.24.10]
String.CamelCase
to convert a string to camelCase.String.PascalCase
to convert a string to PascalCase.String.SnakeCase
to convert a string to snake_case.String.KebabCase
to convert a string to kebab-case.String.ConstantCase
to convert a string to CONSTANT_CASE.String.Capitalize
to a value-level function.String.Words
to split a string into words.String.IsUppercaseLetter
to check if a string is uppercase.String.IsLowercaseLetter
to check if a string is lowercase.String.IsDigit
to check if a string is a digit.Changelog
[0.24.9]
NaturalNumber.Add
to a value-level function.Kind.JuxtN
to juxt kinds with an arity of greater than one.NaturalNumber.FromHex
to convert a hexadecimal string to a decimal number.NaturalNumber.ToHex
to convert a decimal number to a hexadecimal string.String.FromList
to a value-level function.List.PadStart
to pad a list to a desired length with a padding value.List.PadEnd
to pad a list to a desired length with a padding value.String.PadStart
to pad a string to a desired length with a padding character.String.PadEnd
to pad a string to a desired length with a padding character.List.Collate
and Kind.LazyPipe
.Changelog
[0.24.8]
List.Count
to create a frequency map from a list.List.Same
to check if all elements in a list are equal.Object.AtPathInObject
to get the value at a path in an object.Object.AtPath
to a value-level function.Object.Defaults
to initialize an object with default values.Object.Omit
to remove keys from an object.Object.Pick
to pick keys from an object.Object.Values
to a value-level function.List.Slice
and List.Splice
to value-level functions.List.SliceList
and List.SpliceList
utilities.List.Entries
to get the entries of a list as a list of 2-tuples.String.Entries
to get the entries of a string as a list of 2-tuples.Kind.Collapse
to convert an n-arity kind to a 1-arity kind.Changelog
[0.24.7]
NaturalNumber.Digits
to get the digits of a natural number.List.Of
to create a list containing a single value.List.SlidingWindow
to slide a window of a certain length over a list.List.collate
.Changelog
[0.24.6]
String.FromCharCode
to convert a character code to a string.String.IsLetter
to check if a string is a letter.String.ToCharCode
to convert a string to a character code.String.Split
to a value-level function.String.ToLower
to a value-level function.NaturalNumber.SubtractBy
to a value-level function.NaturalNumber.Subtract
to a value-level function.List.Filter
to a value-level function.