Releases: dhershman1/kyanite
Releases · dhershman1/kyanite
v0.9.1
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 besthead
: Bad use case, objects are in no particular ordertail
: Bad use case, objects are in no particular order
Fixed
- Added description to
compose
function
Improved
- The documentation for
any
andwhole
didn't make a lot of sense round
description needed a slight tweak- Made
add
,div
,mul
, andsub
descriptions a bit more strict
v0.9.0
(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 orderwhen
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 typeincludes
has been moved to this typeconcat
has been moved to this typereversed
has been moved to this typenth
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]])
- In order to achieve array type simply use
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
andlte
have been flipped to meet the proper data last structure
Deprecated
pluck
: Shaky code stack, and lack of use cases thatprops
andprop
can't handlestrip
: No real use cases to benefit from thisempty
: No real use cases to benefit from thiscontains
: Useincludes
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 ofwhen
- 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
andidentity
functions - Removed unused code (
circular
andisObject
) - Added handling for an edge case with
Object.keys
inside ofisEqual
Fixed
filter
had incorrect data types within its documentationwhen
documentation typos and no longer hard to read
v0.8.3
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 withfactors
Fixed
- Case where passing a string number to range might produce weird results
v0.8.2
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
New
- Added 2nd level Modularity you can now request sections of the library by type
- Example:
import KO from 'kyanite/object
See theModular By Datatype
section of the readme
- Example:
Fixed
- Documentation spelling error for
path
- Documentation is now Consistent to the linter and the rest of the module
v0.8.0
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 useclone
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 forfor in
looping and checkinghasOwnProperty
- Slight tweaks to
has
andassign
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
Improved
- Replaced null check within
defaults
withisNil
to keep non strict to a minimum
v0.7.0
Breaking Changes
- Swapped param usage for
div
functionality- Ex:
div(4, 2) // => 2
should now bediv(2, 4) // => 2
- Ex:
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
andhead
functions
v0.6.0
Breaking Changes
- Completely re wrote
sift
to act as a for real filter, instead of anotheromit
- 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 comparedisEqual
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
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