I organised the codebase as a starting point for a library, it is an npm
package I developed on Node.js v10.12.0. The index.js
file exposes the
deepFlatten function, which is the piece of code that performs the task
that was asked of me.
To install the test library (jest) enter the project from command line and
type npm i
, then to run the tests suite simply run npm test
.