Utils Project
Every project of any size grows a utils module that contains random helpers. Many of these outgrow their origins and become a shared general-purpose library, such as Lodash in JS or ActiveSupport in Ruby.
Objective
Create your own mini utils file and implement the following functions from lodash:
Array
Map
- mapValues: their impl uses plain objects. I suggest you use the JS Map
String
- template - similar to the built-in backtick strings of ES6
In addition, choose three more functions from the (long) list in the lodash docs.
Additional Requirements
- Each function should have a set of Jasmine unit tests to demonstrate it’s correct
- Don’t forget about edgecases like someone passing in
undefined
or empty input
Bonus
- Measure your testing coverage with an open source tool so you can see if you missed any test coverage
- Publish it as a real NPM package, with a unique package name such as
yourname-utils
and nice README so it looks nice on NPM