My Map Filter Reduce is a micro-project that includes my own implementation's of
JavaScript's Array.prototype.map()
, Array.prototype.filter()
,
Array.prototype.reduce()
. Tests are provided via Jest.
I used JavaScript Playground to scaffold the project. JavaScript playground includes the following technologies:
- HTML5
- CSS3 via SCSS
- ES6+ via Babel
- Module Bundling via Webpack
- Live Reload via Webpack Dev Server
- Formatting via Prettier
- Linting via ESLint
- Type Checking via Flow
- Unit Testing via Jest
I added no additional dependencies to My Map Filter Reduce.
git clone [email protected]:georgebullock/my-map-filter-reduce.git
yarn install
yarn start
npm run t
⚠️ Warning: The project requires node v12.6.0.
💡 Tip: If you're using nvm, you can run
nvm use
to automatically switch to v12.6.0.
💡 Tip: Check out the
scripts
object (inside thepackage.json
) for additional commands.
I was motivated to do this project for four reasons:
- I recently created JavaScript Playground and wanted to test it out with a small project.
- I was interview prepping and I read that writing implementations of commonly used methods is a common code challenge.
- Despite being comfortable with
Array.map()
andArray.filter()
- I never really understood howArray.reduce()
worked until I wrote it myself and then used my implementation to mimicArray.map()
andArray.filter()
. - I'm interested in functional programming and this project was a good exercise in writing higher-order functions.
The project is finished.
No additional features planned.
None that I'm aware of. If you you find something, please create an issue or send me a pull request.