Skip to content
This repository has been archived by the owner on Nov 30, 2018. It is now read-only.

Commit

Permalink
Merge pull request #1694 from armyofda12mnkeys/2.2.X
Browse files Browse the repository at this point in the history
lodash 4 compatibility
  • Loading branch information
nmccready committed Jan 19, 2016
2 parents 64bfc1f + 35698eb commit ef715de
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/coffee/extensions/lodash.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@ angular.module('uiGmapgoogle-maps.extensions')
if result == undefined then defaultValue else result

_.get = get


###
For Lodash 4 compatibility (some aliases are removed)
###

if typeof _.contains == undefined
_.contains = _.includes;
_.prototype.contains = _.includes;
if typeof _.object == undefined
_.object = _.zipObject;
if typeof _.all == undefined
_.all = _.every;
if typeof _.any == undefined
_.any = _.some;

###
Author Nick McCready
Intersection of Objects if the arrays have something in common each intersecting object will be returned
Expand Down

0 comments on commit ef715de

Please sign in to comment.