Skip to content

Releases: dhershman1/kyanite

v0.9.1

30 Sep 21:24
48e0c21
Compare
Choose a tag to compare

Milestone: https://github.com/dhershman1/kyanite/milestone/5?closed=1

Deprecated

  • clone : There is no real need for this since every function already shallow clones data, and a deep clone is shaky ground at best
  • head : Bad use case, objects are in no particular order
  • tail : Bad use case, objects are in no particular order

Fixed

  • Added description to compose function

Improved

  • The documentation for any and whole didn't make a lot of sense
  • round description needed a slight tweak
  • Made add, div, mul, and sub descriptions a bit more strict

v0.9.0

28 Sep 18:14
1ddcb63
Compare
Choose a tag to compare

(One of the biggest additions to Kyanite since launch)
Check out the milestone here: https://github.com/dhershman1/kyanite/milestone/3?closed=1

Breaking Changes

  • isEqual now takes order of arrays into consideration and will return false if arrays do not match in order
  • when is no longer a maybe return and should give back the original data passed in. It also supports only a single param passed in
  • New List type for similar functions that apply to a List of characters (string) and a List of items (Array)
    • slice has been moved to this type
    • includes has been moved to this type
    • concat has been moved to this type
    • reversed has been moved to this type
    • nth has been moved to this type
  • concat flow changed a little bit to work more like built in concat
    • In order to achieve array type simply use concatMap like so: concatMap(x => x, [[1, 2], [3, 4], [5, 6]])
  • range now requires you to pass 2 params to it, it is curried out of the box as well.
  • The parameters for gt, gte, lt and lte have been flipped to meet the proper data last structure

Deprecated

  • pluck : Shaky code stack, and lack of use cases that props and prop can't handle
  • strip : No real use cases to benefit from this
  • empty : No real use cases to benefit from this
  • contains : Use includes within the list type

New

  • Added always function which takes 2 params and always returns the first one. Good for pipes since its curried
  • Added compose function (finally)
  • Added unless function which takes 3 params, and acts the opposite of when
  • Added split function which takes a char and a string and splits the string based on the char
  • Added takeWhile function which will take values from an array based on a function boolean
  • Added dropWhile function which will drop values from an array based on a function boolean
  • Added apply function which takes an array of data and applys a function to it
  • Added either function which takes 2 functions and a value and if either function returns truthy will return true
  • Added endsWith function which checks if the passed in list ends with the given value

Improved

  • Documentation for includes and identity functions
  • Removed unused code (circular and isObject)
  • Added handling for an edge case with Object.keys inside of isEqual

Fixed

  • filter had incorrect data types within its documentation
  • when documentation typos and no longer hard to read

v0.8.3

21 Sep 01:31
a457ca4
Compare
Choose a tag to compare

New

  • Added isPrime function which accepts a number and determines if its prime or not
  • Added factors function which accepts a number and finds its factors

Improved

  • Tweaked range handling and flow to work better with factors

Fixed

  • Case where passing a string number to range might produce weird results

v0.8.2

19 Sep 16:10
d94cb6a
Compare
Choose a tag to compare

Last minute noticing build sizes of a publish were gigantic! Found out why!

Fixed

  • No longer packaging unwanted items like coverage results

Improved

  • Slightly the build process of the module (pre-publish/release anyway)

v0.8.1

19 Sep 14:49
bb829e9
Compare
Choose a tag to compare

New

  • Added 2nd level Modularity you can now request sections of the library by type
    • Example: import KO from 'kyanite/object See the Modular By Datatype section of the readme

Fixed

  • Documentation spelling error for path
  • Documentation is now Consistent to the linter and the rest of the module

v0.8.0

14 Sep 19:53
6812d57
Compare
Choose a tag to compare

Breaking Changes

  • assign is now curried and expects a minimum of 2 values passed in

New

  • Added new clone function, it can create a shallow clone for Objects however accepts a 2nd param to use deep clone capabilities
  • Marked deepClone as deprecated switch over to use clone Example: clone({ a: 1 }, true)
  • New unzip function which takes an object and breaks down into two arrays one of keys and one of values

Improved

  • Re wrote the assign function using Object.keys to remove the need for for in looping and checking hasOwnProperty
  • Slight tweaks to has and assign unit tests
  • Added function names to descriptions of tests to verify what is testing what
  • Further unit test improvements

Fixed

  • The documentation for when was missing a description, this has been addressed

v0.7.1

10 Sep 19:24
13b2128
Compare
Choose a tag to compare

Improved

  • Replaced null check within defaults with isNil to keep non strict to a minimum

v0.7.0

04 Sep 17:42
1ec24fd
Compare
Choose a tag to compare

Breaking Changes

  • Swapped param usage for div functionality
    • Ex: div(4, 2) // => 2 should now be div(2, 4) // => 2

New

  • Added number pow function which takes an exponent and base number and rises the number to the exponents value
  • Added number rem function which finds the remainder of two numbers
  • Added number isOdd function which checks if the provided number is odd or not
  • Added number isEven function which checks if the provided number is even or not
  • Added string toUpper function which transforms a string to all upper case
  • Added string toLower function which transforms a string to all lower case

Improved

  • Removed unreachable code block from equals functionality

Fixed

  • Coverage for tail and head functions

v0.6.0

17 Aug 20:12
8344212
Compare
Choose a tag to compare

Breaking Changes

  • Completely re wrote sift to act as a for real filter, instead of another omit
  • Complete re work of isEqual in an attempt to make it much more lightweight
    • IMPORTANT: This method will no longer handle/care about recursive data in objects so if you are comparing potential circular/recursive data you will get a memory stack error
    • It can still compare Primitive types, as well as Arrays, Objects, Dates, RegExp, and memory like Promises
    • Dropped support for items like Object based Booleans/Strings (new Boolean), Maps, Errors, And a lot of the really super rare edge cases

New

  • Added a new draft function for objects which essentially applies a provided function to all of the values within an object (essentially an object map)
  • Re categorized fuzzySearch as a String function rather than a normal function

Improved

  • isEqual gained a lot of improvements to performance, this is also dependent on the size/format of the data being compared
  • isEqual file size has dropped by a lot with the new re write

Fixed

  • Compatibility patch for using isEqual in IE
  • Documentation bug not showing arguments for functions
  • fuzzySearch param naming in documentation was inconsistent

v0.5.0

19 Jul 17:44
e928416
Compare
Choose a tag to compare

BREAKING CHANGES

  • Tweaked how max was running it's comparisons
  • Tweaked how min was running it's comparisons

New

  • Added head function for objects, which pulls the first value from it
  • Added tail function for objects, which pulls the last value from it
  • Added maxBy function which applies a function to each value before comparing the max
  • Added minBy function which applies a function to each value before comparing the min
  • Added zip function which takes two arrays and turns them into an object key value pair