Skip to content

v2.4.0

Choose a tag to compare

@cmstead cmstead released this 04 Nov 18:53
· 135 commits to master since this release
  • getType - returns type of value -- <any> value -> <string> handles array special case as 'array'
  • isType - checks type of value -- <string> typeString, <any> value -> <boolean>
  • isPrimitive - checks if value type is a primitive -- <any> value -> <boolean>
  • clone - clones objects and arrays -- <T> -> <T>
  • maybeType - Applies type string to maybe function and returns new maybe function accepting a value -- <string> -> <function><T> -> <T | null>
  • eitherType - Applies type string to either function and returns a new, curried either function accepting a default value and an option value -- <string> -> <function><T> -> <function><T> -> <T | null>
  • splitPartial - Performs a split left/right partial, applying final args in the middle of the set - <function>, <array><Any>, <array><Any> -> <function><Any>[<Any>...]
  • Updated functionality to explicitly handle array as a type
    • getType returns array
    • isType('array', []) returns true
    • maybe([], 'array') returns [], array respected as object for backwards-compatibility and Javascript standard
    • either([], [1, 2, 3, 4], 'array') returns [1, 2, 3, 4]
  • Update arity reporting to improve default currying behavior
    • Reduce - default arity of 2, multi-arity max 3
  • Code refactoring
    • Boolean typecast instead of using !!
    • Updates to predicate functionality, reducing footprint
  • Added nuget build automation