Skip to content
This repository was archived by the owner on Jun 25, 2019. It is now read-only.
This repository was archived by the owner on Jun 25, 2019. It is now read-only.

Do we really need _ or lodash? #134

Description

@bengourley

Project wide search for _. returns 17 matches.

  • 16 of them are _.extend()
  • 1 of them is _.pluck()

I think it would be better to use an extend module (it probably exists, if not we can create it):

var extend = require('extend')
extend({}, defaults, options)

We could do the same for pluck, though as it's only used in on place it might make sense to just do an array map (which is what _.pluck does anyway). From the _ source:

_.pluck = function(obj, key) {
  return _.map(obj, function(value){ return value[key]; });
};

_ makes sense on the frontend, as it fills a lot of missing functionality from old browsers, but I think it's an unnecessary grab bag for node code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions