Skip to content

v2.5.0

Choose a tag to compare

@cmstead cmstead released this 18 Nov 05:09
· 124 commits to master since this release
  • isTuple - predicate testing on if array is a tuple of n length <int>, <array> -> <boolean>
  • isPair - special case isTuple representable by j('isTuple', 2) -- intentionally does NOT conform to scheme's pair? predicate
  • isSingle - special case isTuple representable by j('isTuple', 1)
  • isTriple - special case isTuple representable by j('isTuple', 3)
  • transform - transforms an object into a new object through an array of pairs-based transform definitions -- This ignores all non-pair values
  • getKeys - returns array of object keys returns empty array if value is not an object or if object has no keys
  • hasFirst - checks if array contains a first element, always returns false on non-array values
  • always - returns a function which always returns the same value -- similar to j.partial(j.identity, value)
  • empty - accepts type string, returns initialized, empty value of type specified by type string, with no string, empty returns null
  • isMultipleOf - verifies value is multiple of a number
  • composePredicate - takes a list of predicate functions and applies them to a value, returning a boolean, optional combinator allows for and/or combination behavior selection; default behavior is "and"
  • Assorted updates and enhancements
    • Updated shortCircuit to act on an typeString
    • Updated merge function to reduce verbosity and improve stability
    • Added AMD/RequireJS module support