From 35698eba40a6714f91cc1de5d077d385c2c66860 Mon Sep 17 00:00:00 2001 From: Arian Hojat Date: Tue, 19 Jan 2016 00:12:40 -0500 Subject: [PATCH] lodash 4 compatibility --- src/coffee/extensions/lodash.coffee | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/coffee/extensions/lodash.coffee b/src/coffee/extensions/lodash.coffee index 86345377f..31e22e85b 100644 --- a/src/coffee/extensions/lodash.coffee +++ b/src/coffee/extensions/lodash.coffee @@ -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