Changelog
v3.2.0
New
- Added
objOffunction- Creates a new object based on the key value pair provided
fuzzySearchhas beenDeprecatedas of this version and will be removed inv4.0.0
Improved
amendnow uses Object spread rather thanObject.assignfor that small performance boost- When using
Object.assignwith an empty object, Object spread is consistently faster
- When using
- Converted map to use a
whileloop assoc combo - Moved
*.js->*.spec.jsfor unit tests - Expanded upon some more tests to get to 100% coverage
v3.1.0
New
- Added new
memoizeWithfunction - Added new types for
memoizeWith - Added new unit tests for
memoizeWith
v3.0.0
Breaking Changes
updatenow usesadjustunder the hood which gives it all the same rules- Meaning it will also return the list back with an out of bounds index
New
- Added some a new test to
findto test Set Data types - Added new
adjustfunction which applies a function to a supplied array data at a provided index - Added new
keysfunction which takes the keys of a provided object and gives them back as an array
Improved
valuesnow uses the built inkeysfunction instead ofObject.keysdraftnow uses the built inkeysfunction instead ofObject.keys- Converted
any,omit,omitBy,plan,sift,whole, andwithDefaultsto usekeysinstead ofObject.keys - Greatly expanded the unit testing around
values - Expanded the unit tests for
groupBy - Expanded the unit tests for
gtandgte - Expanded the unit tests for
difference - Added an extra unit test for
plan
Fixed
- Documentation link in readme now goes to kyanites website instead of 404ing
v2.1.0
New
- Added new
takeLastfunction- Which takes from the end of an array instead of the beginning
- Added new
dropLastfunction- Returns a list containing all but the last n elements of the given list
- Added new
pickfunction- Picks only the requested keys from a provided object
Improved
- Updated
typesforpathOrso that it can be specified if needed (still defaults toany)
Fixed
- Updated
dropto useMath.maxwhen deciding a starting index- This shouldn't affect the output of
dropwhich is why its not a breaking change - It does however allow usage in other functions to work as expected
- This shouldn't affect the output of
Chore
- Updated Dependencies
v2.0.0
Breaking Changes
- Converted kyanite to a full blown javascript module
- This may cause support issues for IE 11
- Converted from UMD to CJS support
- This may cause support issues for IE 11
- The minified scripts now use
Kinstead ofkyaniteas the TS files specificy - Removed unminified version of the library in favor of breaking down supporting of multiple formats
- Removed "local copy" future support for direct html script tags
Chore
- Export script completely re written
- Updated all dev dependencies
Fixed
- Rollup build stuff to be easier to use on my end and offer more stable support when I run builds
v1.6.3
Changed
- Removed LGTM badge
- Fixed build badge
- Added preset to babel compiler
Chore
- Dev dependency updates
- Removed unused dependency
- Removed
meantype error test since this isn't really needed
v1.6.2
Fixed
rejectwas in the wrong category
Chore
- Updated dev dependencies
v1.6.1
Fixed
- Unreachable overloads in types
- Removed duplicated overloads in types
Improved
- Replaced
tap-specwithtap-on - Replaced CircleCI with github Actions
- Replaced README badge
v1.6.0
New
- Added new
pathSatisfiesfunction, which runs a path to a value which is then passed through a function to see if it satisfies that condition and returns value of predicate - Added new
propSatisfiesfunction, which pulls a prop from an object and runs a function on it, returns value of predicate
Enhanced
- Created an internal
reducerthat is used by other functions, this should help reduce any circular dependencies with that function - Created an internal
reducedthat should help reduce any circular dependencies issues internally - Tweaked typings for
pathfunction to use a newPathtype
Fixed
- The documentation for
differencewas outdated and incorrect
v1.5.0
New
- Added new
omitByfunction which works like omit but uses a predicatefunctioninstead of a key list - Added new
fromPairsfunction which takes an array of arrays that contain key value pairs
Enhanced
- Tweaked a bit of the typings to allow more strict control
- Updated pinet to v1.1.1 for improved documantation functionality
- You can use the enter key with search now to find the function!
- The dist folder is no longer located on Github but it STILL exists with npm (it's built on upload to npm)
v1.4.2
Enhanced
- Removed commitizen and standard-version (It just wasn't working out with how far along this project already is and how I usually do changes/logs)
- Updated all dev dependencies
- Removed david-dm badges because it doesn't seem like david-dm is ever coming back
Fixed
- Some linting errors with new version of standardjs
- Dropped unused scripts
All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
1.4.1 (2020-07-02)
Fixed
- Removed module property from
package.jsonso webpack should bundle it properly using the ie compatible build
Features
- 🎸 Added values type definition (80ad6aa)
1.4.0 (2020-05-28)
Features
- findindex: made findindex IE 11 compatible and switched to using it (0ec2cac), closes #149
- ie11: added compatibility for IE11 (0cc33db), closes #149
- ie11: converted functions using Object.values over to just values (71d5512), closes #149
- values: created new values function (c540b11), closes #149
1.3.0 (2020-03-31)
Features
- converge: added a converge function (6d61d84)
- function: prop and propOr can now handle null values (c46091d), closes #144
- tail: added new tail function (9dba3be)
- xor: added new xor function (8c4a4fb)
1.2.0 (2020-02-27)
Features
- functions: added T, F, tail, and cond Functions (22a300d)
- types: added new functions to types file (b0a9a98)
v1.1.0
Improved
- More typing improvements, most of the function params should now default to any, making the library easier to use in typescript lang
- More tests and examples for
reduce
New
- Added a
pluckfunction which returns a new array by plucking the same named property off all objects in the array supplied
Fixed
- Documentation types for
map
v1.0.2
Improved
- Improved some of the typings for functions
v1.0.1
Improved
- Added more examples to
isNil
Fixed
- Typo in
isNilexamples
v1.0.0
BREAKING CHANGES
sizewas removed you can usecountinsteadfactorsno longer handles negative numbers (see improved section)- This can be accounted for with using the
negatefunction
- This can be accounted for with using the
applyonly take a single param instead of an array of params now- You can use
applyNinstead if you wish to use the old functionality
- You can use
New
- Added a
withDefaultsfunction which will populate an object with default values if they don't exist within the data provided - Added a
multiplesfunction- Stress testing seems to point that it can handle up to 300 million limits in about 1.4s, but anything 400mil+ breaks the stack heap
- If you need to go that high may be wise to look into an arithmatic library
- Added
applyNwhich is taking overapply's old functionality
Improved
- All dependencies upgraded and audit fixes added
- Added some extra unit tests
- Large optimizations for
factorsre wrote the function and it should be able to handle extremely large numbers now- You won't see a huge performance boost on normal numbers within the hundred thousands maybe a few miliseconds this change was mostly to enhance factors so it can handle big integers better
- Note: This does not mean the new
BigIntdata type
- Switched over to use the pinet engine for building the docs
- Cleaned up
isPrimeslightly, debating if the trial division approach is still best or not
Fixed
- CI breaking the CNAME definitions
v0.14.0
BREAKING CHANGES
- Removed
memoizeWithsince 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
startsWithfunction, which should work just likeendsWithbut with the beginning of a list.
Fixed
isPrimeshould handle edge cases like 0 a correctly now and return false instead of 0 (#121)endsWithsignature to reflect list instead of Array
v0.13.0
BREAKING CHANGES
findhas gone back to returningundefinedinstead ofnullfor not found values
New
- Added
foldfunction which runs areducewithout an initial accumulator - Added the
propOrFunction 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-pagesbranch
Fixed
- Documentation for functions showing up
deprecatedwhen they were actually not - Documentation for
joinmoved it to theArrayCategory, and fixed a typo in it's example - Documentation for
applyshowed incorrect curry examples
Improved
minis now using thefoldfunction- Finally improved the documentation process so now documentation changes won't flood the PRs!
v0.12.2
New
- Added
propEqfunction which takes a object property value and compares it against a given value to see if it's equal - Added
notEqfunction which checks if the provided values are not equal to each other
Fixed
- The documentation for
andshould now reflect correctly on the return and params
v0.12.1
Fixed
pathOrandpathbreaking onnullvalue
v0.12.0
BREAKING CHANGES
ascendanddescendare 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:
ascendByanddescendByhave kept their curried status
New
- Added a
medianfunction which gets the median of an array of numbers - Added a
modfunction which behaves like a modulo would in actual mathematics - Added
somePassfunction which takes an array of functions and passes a value through them until one passes or the end is reached - Added
everyPassfunction which takes an array of functions and passes a value through until one fails or the end is reached - Added
chunkfunction which chunks an array of data into smaller arrays
Improved
pipe&pipePare now using the Kyanitereducegiving them a small performance boost
Fixed
- Fixed a lot of signature displays through out the docs
- Documentation Fixes:
addIndexdescription tweaksmemoizeWithadded RamdaJs credit since it's based mostly off their versionlt,lte,gt, andgteall had invalid examples in their documentation. This is addressed nowfindanddeepEqexamples were incorrect
v0.11.3
New
- Added
sumfunction which takes an array of numbers and adds them together- TS type added
- Added
productfunction which takes an array of numbers and multiplies them together- TS type added
- Switched over to Circleci and Codecov
Fixed
- TS types
- Added
addIndextype - Added
memoizeWithtype
- Added
addIndexDocumentationsliceDocumentation
v0.11.2
New
- Added a
addIndexfunction which can be used onmap,filter, orreducelike functions to have them return the index and full list back to your callback function - Re added the
amendfunction (for now?) - Added
memoizeWithfunction
v0.11.0 (0.11.1)
Breaking Changes
factorsoutput 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
negateandmap- e.g:
map(negate, factors(-36)) // => [-1, -2, -3, -4, -6, -9, -12, -18, -36]
- e.g:
- Example:
empty(andisEmptyuntil its removed) will now throw a type error for unsupported typesemptysupports the same types ascountas well asnullandundefined- e.g:
empty(1) // => TypeError: Unsupported type: Number
juxtfunctionality 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
- e.g:
apre written to be a proper S combinator function- e.g:
ap(x => y => x + y, z => z * 2, 2) // => 6
- e.g:
- Removed
amendfunction since it's really just a limitedObject.assignno real use for it
New
reducenow supports iterable types likeMapandSet- Added
incFunction which increases a number by 1 - Added
decFunction which decreases a number by 1 - Added
isZeroFunction which checks if the number passed in is equal to the number zero - Added
sizeFunction which takes a map or set data type and returns its size- Note: It is currently categorized under
Functionwhich may change in the future as I add more Map|Set friendly functions
- Note: It is currently categorized under
- Added
countFunction which takes any collection based data and counts the values within - Added
reducedFunction which should be used withreduceorreduceRightas a short circuit for the function (see improved) hasis now generic forArray,String,Object,Map, andSetdata types- Added
withinFunction which acts likebetweenbut is exclusive of the numbers provided
Improved
isEmptynow supportsMapsandSets- Slight increase in
partitionperformance - Slight increase in
omitperformance - Added import example onto each function, so it's visible within the examples
factorshad some typos in its docs- Cleaned up
alwaysdocumentation - Cleaned up
identitydocumentation examples - Cleaned up
typeto be more lightweight - Completely re wrote
reduceandreduceRight- No breaking changes
- Both functions now support
reducedwhich will short circuit out of the iteration and return the value - This is a good strategy for performance boosts
reduce,reduceRight, andreducedare all using the@@transducerprotocol- Moved
every,some,reject,filter, andfindto use this new flow giving them decent performance improvements - Tweaked
heightfunction for a tiny performance boost
v0.10.3
Fixed
- Updated Dev Dependency
npm-run-allto fix the critical security vulnerability - Homepage url to point to https://kyanite.dusty.codes
v0.10.2
New
- Added TypeScript Declarations file to bring in typings for functions
- Added
pathOrfunction which works like path but allows a value to be returned rather than justundefined - Added
testfunction which runs a regex test against a provided string - Added
matchfunction which will match a string against some regex and build an array of matching strings
Improved
- README organization to help alleviate confusion
- Documentation for
partition,max,min,maxBy, andminByto be a bit easier to understand
Fixed
rangewill no longer show up under theFunctioncategory- Docs for
findso that the return is accurate - Docs for
omitso that the description is accurate and makes sense, also made the param more verbose - Docs for
pathto correct the description - Docs for
orto have the correct types associated with the values - Docs for
concatto correct it's signature Listtype docs to depict String & Array signatures or "List" signatures
v0.10.1
Fixed
omitdocumentation to show correct input
New
- Added
overfunction which applies a function over a object value
v0.10.0
Breaking Changes
Compatibility
- Dropped IE support
- Dropped modularity support please see issue #61 for more info
- In short, with the recent rollup versions currying is better supported for tree shaking
Removed
- All deprecated functions
is,compact,compress,empty,deepClone,contains,strip,clone,head,tail,pluck, andwords
assign,entries, andvaluesSince we dropped IE support you shouldn't need these functionsunzip- Rare use case limited usabilitydefaults- Rare use case, you can achieve similar withObject.assignand small tweaking
Rename
subtosubtractmultomultiplydivtodivideidenticaltoeqisEqualtodeepEq
Other
reducenow expects a flipped reducer function(x, acc)rather than(acc, x)addNo longer does type coercion to the values passed infindandfindIndexnow use the built in higher order functions- Moved
lastandfirstinto the list type rather than array - Flipped the way
subtractdoes math instead ofsubtract(2, 1) === 2 - 1it will now besubtract(1, 2) === 2 - 1 meanhas gone back to returningNaNif given an empty array and will throw aRef Errorif given no paramsrangewill not return a type error if given a string- Re wrote
isEqualagain, making it far more flexible again as well as far more performant omitnow requires you to send an array of keys even if it's just onedifferenceno longer cares about array order, and accepts an array of arraysapplynow always requires an array for values
Improved
- Huge performance gains, added internal curry backend since functions rely on each other so much
- Replaced
uglify-jswithterser - Moved
meanto Number type rather than Array type - Also cleaned up
mean - Cleaned up and fixed the
meandocumentation - Cleaned up
complementandrejectdocumentation - Param rename in
pipeto be more verbose/accurate - Cleaned up
sortBy - Cleaned up
gcd - Cleaned up
factors - Moved
lengthto list type isEqual's documentation needed more examplesisEqualis able to handleSetdata typesisEmptyusesisNilnow instead of!xisOddandisEvenboth cleaned up nicely- Moved
rangeto number type heightimprovements to use.valuesvs.keys
New
- Added
flipfunction which flips the params sent to a given function - Added
eqByfunction which compares two values after applying a function to both - Added
negatefunction which adds a negative to a given number - Added
composePfunction which works likecomposebut with Promises - Added
pipePfunction which works likepipebut with Promises - Added
replacefunction which takes a string and replaces a value within it - Added
countByfunction which takes an array and counts the values - Added
amendfunction which amends a new object into an old to update data - Added
clampfunction which clamps a number between 2 others - Added
defaultTofunction which returns a value unless it isNaN,undefined, ornullthen it returns a default - Added
reduceRightfunction which works likereducebut starts from the right of the array
v0.9.2
Deprecated
isThere isn't a solid enough use case for this aside from maybe a test suite, this is also pretty messy data wise- Try using
typeinstead
- Try using
identicalAs it is going to become theeqfunction in v0.10.0compactusefilterinsteadcompressusesiftinsteadwordsThe use case is basically just usingsplitanyway
Fixed
- Incorrect documentation on
compose - Typo in
includesdocumentation
v0.9.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
composefunction
Improved
- The documentation for
anyandwholedidn't make a lot of sense rounddescription needed a slight tweak- Made
add,div,mul, andsubdescriptions a bit more strict
v0.9.0
Notice: All deprecated functions will be removed in the v0.10.0 release
Breaking Changes
isEqualnow takes order of arrays into consideration and will return false if arrays do not match in orderwhenis no longer a maybe return and should give back the original data passed in. It also supports only a single param passed in- New
Listtype for similar functions that apply to a List of characters (string) and a List of items (Array)slicehas been moved to this typeincludeshas been moved to this typeconcathas been moved to this typereversedhas been moved to this typenthhas been moved to this type
concatflow changed a little bit to work more like built in concat- In order to achieve array type simply use
concatMaplike so:concatMap(x => x, [[1, 2], [3, 4], [5, 6]])
- In order to achieve array type simply use
rangenow requires you to pass 2 params to it, it is curried out of the box as well.- The parameters for
gt,gte,ltandltehave been flipped to meet the proper data last structure
Deprecated
pluck: Shaky code stack, and lack of use cases thatpropsandpropcan't handlestrip: No real use cases to benefit from thisempty: No real use cases to benefit from thiscontains: Useincludeswithin the list type
Fixed
filterhad incorrect data types within its documentationwhendocumentation typos and no longer hard to read
New
- Added
alwaysfunction which takes 2 params and always returns the first one. Good for pipes since its curried - Added
composefunction (finally) - Added
unlessfunction which takes 3 params, and acts the opposite ofwhen - Added
splitfunction which takes a char and a string and splits the string based on the char - Added
takeWhilefunction which will take values from an array based on a function boolean - Added
dropWhilefunction which will drop values from an array based on a function boolean - Added
applyfunction which takes an array of data and applys a function to it - Added
eitherfunction which takes 2 functions and a value and if either function returns truthy will return true - Added
endsWithfunction which checks if the passed in list ends with the given value
Improved
- Documentation for
includesandidentityfunctions - Removed unused code (
circularandisObject) - Added handling for an edge case with
Object.keysinside ofisEqual
v0.8.3
New
- Added
isPrimefunction which accepts a number and determines if its prime or not - Added
factorsfunction which accepts a number and finds its factors
Improved
- Tweaked
rangehandling and flow to work better withfactors
Fixed
- Case where passing a string number to range might produce weird results
v0.8.2
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/objectSee theModular By Datatypesection 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
assignis now curried and expects a minimum of 2 values passed in
Deprecated
deepClone: Usecloneinstead, to mimic the deep clone functionality do this:clone({ a: 1 }, true)
New
- Added new
clonefunction, it can create a shallow clone for Objects however accepts a 2nd param to use deep clone capabilities - New
unzipfunction 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.keysto remove the need forfor inlooping and checkinghasOwnProperty - Slight tweaks to
hasandassignunit tests - Added function names to descriptions of tests to verify what is testing what
- Further unit test improvements
Fixed
- The documentation for
whenwas missing a description, this has been addressed
v0.7.1
Improved
- Replaced null check within
defaultswithisNilto keep non strict to a minimum
v0.7.0
BREAKING CHANGES
- Swapped param usage for
divfunctionality- Ex:
div(4, 2) // => 2should now bediv(2, 4) // => 2
- Ex:
New
- Added number
powfunction which takes an exponent and base number and rises the number to the exponents value - Added number
remfunction which finds the remainder of two numbers - Added number
isOddfunction which checks if the provided number is odd or not - Added number
isEvenfunction which checks if the provided number is even or not - Added string
toUpperfunction which transforms a string to all upper case - Added string
toLowerfunction which transforms a string to all lower case
Improved
- Removed unreachable code block from equals functionality
Fixed
- Coverage for
tailandheadfunctions
v0.6.0
BREAKING CHANGES
- Completely re wrote
siftto act as a for real filter, instead of anotheromit - Complete re work of
isEqualin 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
Fixed
- Compatibility patch for using
isEqualin IE - Documentation bug not showing arguments for functions
- fuzzySearch param naming in documentation was inconsistent
New
- Added a new
draftfunction for objects which essentially applies a provided function to all of the values within an object (essentially an object map) - Re categorized
fuzzySearchas a String function rather than a normal function
Improved
isEqualgained a lot of improvements to performance, this is also dependent on the size/format of the data being comparedisEqualfile size has dropped by a lot with the new re write
v0.5.0
BREAKING CHANGES
- Tweaked how
maxwas running it's comparisons - Tweaked how
minwas running it's comparisons
New
- Added
headfunction for objects, which pulls the first value from it - Added
tailfunction for objects, which pulls the last value from it - Added
maxByfunction which applies a function to each value before comparing the max - Added
minByfunction which applies a function to each value before comparing the min - Added
zipfunction which takes two arrays and turns them into an object key value pair
v0.4.1
Fixed
fuzzySearchalgorithm is stable again and extremely more accurate than before- I may need to look into a better solution than I currently have for it however
Improved
- Added more complex testing strings to
fuzzySearchtests
v0.4.0
BREAKING CHANGES
- Renamed
getstopropsto meep the convention consistent - Renamed
includestocontainsfor strings (swapped with array) - Renamed
containstoincludesfor arrays (swapped with string) - Removed
deepClonebecauseassignultimately generates a brand new object when ran
New
- Added
joinstring function which accepts a string and an array to generate a joined string - Added
branchfunction which takes 3 functions and a value, and will run either the 2nd or 3rd function based on if the first passes - Added
apfunction which takes an array of functions to be applied to an array of data, concating the results together - Added
onfunction which takes 2 functions and 2 values, applies the 2nd function to both values and then applies the first function onto those
Changes
- Converted the function used by compact to just be
identity - Added some slight test additions to
pipe - Tweaked documentation automation to make sure the main site is always up to date
v0.3.0
Changes
- Re organized the
srcandtestfolder contents into seperate folders based on category- This is no way affects usage, you can still do
import isEmpty from 'kyanite/isEmpty'it's more to make it easier to work with and avoid duplication
- This is no way affects usage, you can still do
findIndexreturns a maybe, so instead of a -1 if no index is found it will returnundefined- The
srcfolder is now included on install, so if you want to use the es6 versions of the module, you can import them fromkyanite/src/type/function- An example might be for curry it'd be:
import curry from 'kyanite/src/function/curry'
- An example might be for curry it'd be:
Fixes
- A few documentation fixes which also involved some missing information/categories
v0.2.2
New
- Added
encasewhich encases the provided function with try catch to safely execute the function - Added
dropwhich takes an array and drops the requested number of values from the front - Added
takewhich pulls values from an array up until the point specified (the opposite of drop) - Added
sortWithwhich takes an array of functions and goes through the array when it encounters ties with the data while sorting it
v0.2.1
New
- Added
findIndexfunction which takes a function and array and returns the first value from the array that passes the function - Added
groupByfunction which groups the values of an array into common properties of an object - Added
sortByfunction which sorts an array based on the values when ran through a function - Added
descendByfunction which accepts a function to run against values for sorting in descending order - Added
ascendByfunction which accepts a function to run against values for sorting in ascending order
v0.2.0
New
- Added
ascendfunction which can be used with sort for ascending order - Added
descendfunction which can be used with sort for descending order - Added
bothfunction which accepts 2 functions and a value, returns true if both functions pass, otherwise returns false
Improved
- Added ability to handle string numbers to
addfunction
v0.1.0
BREAKING CHANGES (If converting from dusty-fns)
fuzzySearchparams have been swapped, so now itsfuzzySearch(needle, haystack)instead- Renamed
removeAtto justremove - Renamed
replaceAtto justupdate flattenhas been removed, consider usingconcatandconcatMapinsteaduniqnow only looks for an array, useuniqByin order to use the old functionality- Removed
clonesinceassignis essentially the same thing with more capabilities - Function params passed to
juxtshould now be contained within a single array - Changed the return of
meanso it returns 0 instead ofNaNfor bad arguments passed in isEmptynow handles values such asnull,undefined,NaN, andBooleansit will returntruefor ALL of theseemptyno longer throws an error for non "emptyables". Instead it returnsundefined
Fixed
- Addressed copy and paste errors for
prependdocs - Addressed several documentation errors
Improved
- Some more tweaks to internal documentation scripts
- Replaced
avaand converted back totape(Yay!) maxnow useslastinternally instead ofnthshould improve is seperate build size/performanceminnow usesfirstinternally instead ofnthshould improve is seperate build size/performance- Removed
functionNameinternal since it's no longer being used - Improved build size of
isEqualby removing impossible logic - Added onto
identicaldocumentation with more examples - Re-wrote
assignfor better optimization,
New
- Added
pathfunction to safely navigate objects that may or may not have properties - Added
siftfunction which works a lot likefilterbut withObjectdata types - Added
wholefunction which works a lot likeeverybut withObjectdata types - Added
anyfunction which works a lot likesomebut withObjectdata types - Added
insertfunction which inserts a data value into a specified index of an array - Added
heightfunction which works like length, however it handles object data types - Added
getsfunction which goes through an object to pull values requested in an array - Added
planfunction which takes a schema object of functions to apply to a matching object of data - Added
gtfunction which compares the passed in values to determine if one is greater than the other - Added
gtefunction which compares the passed in values to determine if one is greater than or equal to the other - Added
ltfunction which compares the passed in values to determine if one is less than the other - Added
ltefunction which compares the passed in values to determine if one is less than or equal to the other - Added
whenfunction which uses a logic function to trigger an action function if the arguments are true - Added
concatfunction which concats the values of an array to a new array - Added
concatMapfunction which applies a function to the values of an array and concats them - Added
compactfunction which takes an array and removes all falsy values from it - Added
uniqByfunction which does what the originaluniqwas built to do