/de-duplicated-array

An example exercise for removing duplicates in an array (NodeJS)

Primary LanguageJavaScript

De-duplicate Array Exercise

This is a simple Nodejs application that is an exercise in writing a utility function to take an array of numbers and removes duplicates from the array

Dependcies

  • NodeJS
  • NPM
  • Grunt CLI

Install

After cloning the code

  • Run npm install from the root of the project to get all node modules
  • Run grunt mocha-test to run the test suite which also creates a coverage report
  • Run node main.js to run the example using the flatten utility function, you can supply your own file by running node main.js -f path/to/file - for example node main.js -f ./tests/files/test