Skip to content

Releases: dhershman1/kyanite

v0.14.0

08 Jul 20:56
39faf7b
Compare
Choose a tag to compare

With v0.14.0 out the door I think it's time to seriously look into and start considering a 1.0 launch.

BREAKING CHANGES

  • Removed memoizeWith since it was more of a POC from ramda's code base
    • I will most likely look into re adding it with my own code if the need is there right now I just don't see it

New

  • Added startsWith function, which should work just like endsWith but with the beginning of a list.

Fixed

  • isPrime should handle edge cases like 0 a correctly now and return false instead of 0 (#121)
  • endsWith signature to reflect list instead of Array

v0.13.0

25 May 21:21
07078b1
Compare
Choose a tag to compare

BREAKING CHANGES

  • find has gone back to returning undefined instead of null for not found values

New

  • Added fold function which runs a reduce without an initial accumulator
  • Added the propOr Function which returns the value of a property from an object or the provided default value
  • CircleCI will now handle publishing the documentation to the gh-pages branch

Fixed

  • Documentation for functions showing up deprecated when they were actually not
  • Documentation for join moved it to the Array Category, and fixed a typo in it's example
  • Documentation for apply showed incorrect curry examples

Improved

  • min is now using the fold function
  • Finally improved the documentation process so now documentation changes won't flood the PRs!

v0.12.2

24 Apr 16:44
92524aa
Compare
Choose a tag to compare

Click Here to view the milestone

New

  • Added propEq function which takes a object property value and compares it against a given value to see if it's equal
  • Added notEq function which checks if the provided values are not equal to each other

Fixed

  • The documentation for and should now reflect correctly on the return and params

v0.12.1

09 Apr 16:52
016006d
Compare
Choose a tag to compare

Fixed

  • pathOr and path breaking on null value

v0.12.0

26 Mar 19:40
b071cad
Compare
Choose a tag to compare

Breaking Changes

  • ascend and descend are no longer curried since they're meant to be sort based functionality and will always be called with their 2 params
    • The reasoning behind this is primarily performance, when using the function as intended there is a significant drop in performance
    • Note: ascendBy and descendBy have kept their curried status

New

  • Added a median function which gets the median of an array of numbers
  • Added a mod function which behaves like a modulo would in actual mathematics
  • Added somePass function which takes an array of functions and passes a value through them until one passes or the end is reached
  • Added everyPass function which takes an array of functions and passes a value through until one fails or the end is reached
  • Added chunk function which chunks an array of data into smaller arrays

Improved

  • pipe & pipeP are now using the Kyanite reduce giving them a small performance boost

Fixed

  • Fixed a lot of signature displays through out the docs
  • Documentation Fixes:
    • addIndex description tweaks
    • memoizeWith added RamdaJs credit since it's based mostly off their version
    • lt, lte, gt, and gte all had invalid examples in their documentation. This is addressed now
    • find and deepEq examples were incorrect

v0.11.3

18 Feb 15:14
f808774
Compare
Choose a tag to compare

New

  • Added sum function which takes an array of numbers and adds them together
    • TS type added
  • Added product function which takes an array of numbers and multiplies them together
    • TS type added
  • Switched over to Circleci and Codecov

Fixed

  • TS types
    • Added addIndex type
    • Added memoizeWith type
  • addIndex Documentation
  • slice Documentation

v0.11.2

04 Feb 22:04
2c22b71
Compare
Choose a tag to compare

New

  • Added a addIndex function which can be used on map, filter, or reduce like functions to have them return the index and full list back to your callback function
  • Re added the amend function (for now?)
  • Added memoizeWith function

Fixed

  • Some slight documentation tweaks and fixes

v0.11.0 (0.11.1)

22 Jan 21:51
3b724e9
Compare
Choose a tag to compare

Note: Had to release as 0.11.1 because I was a dumb with the beta version

Breaking Changes

  • factors output has changed to be inclusive, it also works with negative numbers now
    • Example: factors(-36) // => [1, 2, 3, 4, 6, 9, 12, 18, 36]
    • You can easily get negative factors with negate and map
      • e.g: map(negate, factors(-36)) // => [-1, -2, -3, -4, -6, -9, -12, -18, -36]
  • isEmpty will now throw a type error for unsupported types
    • isEmpty supports the same types as count as well as null and undefined
    • e.g: isEmpty(1) // => TypeError: Unsupported type: Number
  • juxt functionality changes. It's now a 2 param curried function that takes arrays for data
    • e.g: juxt([Math.min, Math.max], [3, 4, 9, -3]) // => [-3, 9]
    • Also moved it to be in the array category
  • ap re written to be a proper S combinator function
    • e.g: ap(x => y => x + y, z => z * 2, 2) // => 6
  • Removed amend function since it's really just a limited Object.assign no real use for it

New

  • reduce now supports iterable types like Map and Set
  • Added inc Function which increases a number by 1
  • Added dec Function which decreases a number by 1
  • Added isZero Function which checks if the number passed in is equal to the number zero
  • Added size Function which takes a map or set data type and returns its size
    • Note: It is currently categorized under Function which may change in the future as I add more Map|Set friendly functions
  • Added count Function which takes any collection based data and counts the values within
  • Added reduced Function which should be used with reduce or reduceRight as a short circuit for the function (see improved)
  • has is now generic for Array, String, Object, Map, and Set data types
  • Added within Function which acts like between but is exclusive of the numbers provided

Improved

  • isEmpty now supports Maps and Sets
  • Slight increase in partition performance
  • Slight increase in omit performance
  • Added import example onto each function, so it's visible within the examples
  • factors had some typos in its docs
  • Cleaned up always documentation
  • Cleaned up identity documentation examples
  • Cleaned up type to be more lightweight
  • Completely re wrote reduce and reduceRight
    • No breaking changes
    • Both functions now support reduced which will short circuit out of the iteration and return the value
    • This is a good strategy for performance boosts
  • reduce, reduceRight, and reduced are all using the @@transducer protocol
  • Moved every, some, reject, filter, and find to use this new flow giving them decent performance improvements
  • Tweaked height function for a tiny performance boost

v0.11.0-beta.6

15 Jan 02:55
Compare
Choose a tag to compare
v0.11.0-beta.6 Pre-release
Pre-release

important: The documentation at https://kyanite.dusty.codes is not reflective of beta changes

You can install the beta with npm i kyanite@beta

New

  • Added within Function which acts like between but is exclusive of the numbers provided

Improved

  • has is now generic for Array, String, Object, Map, and Set data types
  • Tweaked height function for a tiny performance boost

v0.11.0-beta.5

04 Jan 19:02
Compare
Choose a tag to compare
v0.11.0-beta.5 Pre-release
Pre-release

Introduced a transducer setup for the reduce functions, allowing the use of reduced to help improve performance across the board.

important: The documentation at https://kyanite.dusty.codes is not reflective of beta changes

You can install the beta with npm i kyanite@beta

New

  • Added reduced Function which should be used with reduce or reduceRight as a short circuit for the function (see improved)

Improved

  • Cleaned up type to be more lightweight
  • Completely re wrote reduce and reduceRight
    • No breaking changes
    • Both functions now support reduced which will short circuit out of the iteration and return the value
    • This is a good strategy for performance boosts
  • reduce, reduceRight, and reduced are all using the @@transducer protocol
  • Moved every, some, reject, filter, and find to use this new flow giving them decent performance improvements