jonsey247 / Lowbar

0 stars 0 forks source link

Lowbar

Notes

I have combined two Northcoders sprints, Lowbar and Advanced Lowbar, into one repository. These sprints involved implementing Underscore functions with pure JavaScript, and testing them in Mocha and Chai.

To test these functions, after cloning this repository from the terminal with $ git clone <REPO_NAME>

Simply enter again in the terminal these commands.

$ npm install

then after the dependencies have been installed, enter

$ npm test


Goals

  1. Continue practicing test-driven development (TDD) - both the process and the tools you'll be using to do it from now until the end of the course (and beyond).
  2. Get an 'inside view' of one of the most heavily used JavaScript libraries underscore (11m downloads on NPM last month) and get used to reading its API documentation.
  3. Become accustomed to using NPM to find and install JS libraries
  4. Learn to effectively pair program and use Git/Github as a collaboration tool.
  5. Lay the foundations for understanding the functional style of programming that JS lends itself so well to.

Tasks

The Lowbar Sprint involves reimplementing a JS library as if I were its author. For Part 1 of this sprint , I need to reimplement the following methods:

Core

These are the core functions I have implamented;

  1. identity
  2. first
  3. last
  4. each
  5. indexOf
  6. filter
  7. reject
  8. uniq
  9. map
  10. contains
  11. pluck
  12. reduce
  13. every
  14. some
  15. extends
  16. defaults

Advanced

  1. once
  2. memoize
  3. shuffle
  4. invoke
  5. sortBy
  6. zip
  7. sortedIndex
  8. flatten
  9. intersection
  10. difference
  11. indexOf (again, this time with a binary search)