Skip to content
Pure JavaScript implementations of Underscore functions
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
spec
.eslintrc
.gitignore
README.md
lowbar.js
package-lock.json
package.json

README.md

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.


Instructions

  1. Clone this repository to your local machine: git clone https://github.com/dentednerd/LowbarAdv.git
  2. Install the necessary NPM modules: npm i
  3. Run the tests for all the functions: npm t

Core Functions

  1. identity
  2. first
  3. last
  4. each
  5. indexOf
  6. filter
  7. reject
  8. uniq
  9. map
  10. contains

Extra Credit

  1. pluck
  2. reduce
  3. every
  4. some
  5. extends
  6. defaults

Advanced Functions

  1. once
  2. memoize
  3. shuffle
  4. invoke
  5. sortBy
  6. zip
  7. sortedIndex
  8. flatten
  9. intersection
  10. difference

Extra Credit

  1. indexOf (again, this time with a binary search)

Goals

In this sprint I:

  1. Continued to practice TDD.
  2. Got an inside view of Underscore, and got used to reading its API documentation.
  3. Became accustomed to using NPM to find and install JS libraries.
  4. Learned to effectively pair program, and to use Git/Github as a collaboration tool.
  5. Began to understand the functional style of programming.

I heavily referenced these APIs:

  1. Underscore
  2. The Mocha Test Framework
  3. The Chai Assertion Library
You can’t perform that action at this time.