My own implementation of a number of JavaScript's array functions
To learn more about higher order functions, callbacks, testing and how JavaScript's array functions work under the hood
npm install
- Array functions are exported by the one ES6 module so that they can be imported like:
import { every } from 'rob_';
- Each function has a minimal test suite that ensures that they're functioning correctly
- Each function and its tests are implemented in a unique branch and merged into
main
when approved
- Use RunJs for development
- Reference mdn's array docs for more information on how each of the functions works and to assist with deciding on how to test each function
-
every
-
filter
-
find
-
findIndex
-
flat
- can be done recursively :O -
flatMap
-
forEach
-
map
-
reduce
-
reduceRight
-
some