Skip to content
This repository was archived by the owner on Aug 3, 2020. It is now read-only.

Conversation

@trygve-lie
Copy link
Contributor

Fixes #12

This uses the same core-util-is module as used in helmetjs/hsts#1 for checking types. When not supporting pre node.js 0.12.x versions any more, this module can be removed and one can only rely on the native util in node.js / iojs.

There was one usage of lodash .map function which now are replaced with plain higher order Array functions.

Then, there was a lodash deep copy of objects. From what I could see this copy function only copy the config object which is pretty flat and holds only String and Array values. I replaced this with a very simple shallow copy function instead. This shallow copy function only copy one level and only handle Arrays as special values. If a deep copy is wanted we could replace this with:

var newObject = JSON.parse(JSON.stringify(originalObject));

Lodash are still present as a devDependency since its used in the tests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Remove Lodash dependency

2 participants