Underscore version is very old (1.0.8) time to update?

Hi all,

I was trying to use a couple of underscore functions (extendOwn or assign) with no success (no method error). I then checked the meteor version (1.0.8) and found it is pretty far behind underscore current version (1.8.3). I am running Meteor v1.3.2.4.

I tried to find documentation for 1.0.8 but I cannot find it :confused:. Anyone have a tip?
Or better yet, maybe I have the wrong version running in Meteor and it is updated?

Question: is underscore going to get updated? Or switch to lodash? or? or? Maybe it is dependent upon the node changes currently under way?

Thanks for any insight!

Just use the npm version of underscore.
No need for wrapper packages since meteor 1.3

Meteor’s version of bundled underscore has a few patches spcific to Meteor and is used extensively, so is kind of coupled with that specific version.

What you can do is npm install --save underscore and import { extendOwn } from ‘underscore’ to use those newer functions

But a lot of people have moved on to lodash or ramda anyway

I recommend switching to lodash. You don’t need to use the underscore that comes with Meteor, though it will always be there. I would also explicitly import when I need it (that way you’re not relying on the globals) It can work on both client and server, here’s an example on the server from https://github.com/trajano/meteor-boilerplate/blob/angular/server/tasks/index.js

import _ from 'lodash'

Meteor.startup(() => {
    text: 1
  }, _.noop)

+1 for switching to lodash. However, consider, that they changed API a lot in the latest major version, so it is not fully compatible with underscore anymore.

Will Meteor ever switch from underscore to lodash?

see https://github.com/meteor/meteor/issues/1009