Skip to content

Commit ef715de

Browse files
committed
Merge pull request angular-ui#1694 from armyofda12mnkeys/2.2.X
lodash 4 compatibility
2 parents 64bfc1f + 35698eb commit ef715de

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/coffee/extensions/lodash.coffee

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,22 @@ angular.module('uiGmapgoogle-maps.extensions')
9696
if result == undefined then defaultValue else result
9797

9898
_.get = get
99+
100+
101+
###
102+
For Lodash 4 compatibility (some aliases are removed)
103+
###
104+
105+
if typeof _.contains == undefined
106+
_.contains = _.includes;
107+
_.prototype.contains = _.includes;
108+
if typeof _.object == undefined
109+
_.object = _.zipObject;
110+
if typeof _.all == undefined
111+
_.all = _.every;
112+
if typeof _.any == undefined
113+
_.any = _.some;
114+
99115
###
100116
Author Nick McCready
101117
Intersection of Objects if the arrays have something in common each intersecting object will be returned

0 commit comments

Comments
 (0)