Skip to content

Commit 3b911c6

Browse files
committed
change aliases removed from lodash v4
a number of aliases have been removed from the next major version of lodash: https://github.com/lodash/lodash/tree/4.0.0/doc
1 parent 065568a commit 3b911c6

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

spec/coffee/directives/api/models/parent/markers-parent-model.spec.coffee

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,21 @@ describe 'MarkersParentModel - Clusterer Event Extensions', ->
8484
@subject.plurals.put 1, model: 'test1'
8585
@subject.plurals.put 2, model: 'test2'
8686
@subject.scope.clusterEvents.click @clusterTest
87-
expect(_.all(@markerModelsCluster, (entity, i)=>
87+
expect(_.every(@markerModelsCluster, (entity, i)=>
8888
entity == @subject.plurals.get(i+1).model
8989
)).toBeTruthy()
9090
it 'mouseout - ', ->
9191
@subject.plurals.put 1, model: 'test1'
9292
@subject.plurals.put 2, model: 'test2'
9393
@subject.scope.clusterEvents.mouseout @clusterTest
94-
expect(_.all(@markerModelsCluster, (entity, i)=>
94+
expect(_.every(@markerModelsCluster, (entity, i)=>
9595
entity == @subject.plurals.get(i+1).model
9696
)).toBeTruthy()
9797
it 'mouseover - ', ->
9898
@subject.plurals.put 1, model: 'test1'
9999
@subject.plurals.put 2, model: 'test2'
100100
@subject.scope.clusterEvents.mouseover @clusterTest
101-
expect(_.all(@markerModelsCluster, (entity, i)=>
101+
expect(_.every(@markerModelsCluster, (entity, i)=>
102102
entity == @subject.plurals.get(i+1).model
103103
)).toBeTruthy()
104104
describe 'some legacy event', =>

src/coffee/directives/api/map.coffee

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ angular.module('uiGmapgoogle-maps.directives.api')
127127
disabledEvents = [disabledEvents]
128128

129129
maybeHookToEvent = (eventName, fn, prefn) ->
130-
unless _.contains disabledEvents, eventName
130+
unless _.includes disabledEvents, eventName
131131
prefn() if prefn
132132
listeners.push google.maps.event.addListener _gMap, eventName, ->
133133
unless scope.update?.lazy
134134
fn()
135135

136-
unless _.contains disabledEvents, 'all'
136+
unless _.includes disabledEvents, 'all'
137137
maybeHookToEvent 'dragstart', ->
138138
dragging = true
139139
scope.$evalAsync (s) ->
@@ -145,7 +145,7 @@ angular.module('uiGmapgoogle-maps.directives.api')
145145
s.dragging = dragging if s.dragging?
146146

147147
updateCenter = (c = _gMap.center, s = scope) ->
148-
return if _.contains disabledEvents, 'center'
148+
return if _.includes disabledEvents, 'center'
149149
if angular.isDefined(s.center.type)
150150
s.center.coordinates[1] = c.lat() if s.center.coordinates[1] isnt c.lat()
151151
s.center.coordinates[0] = c.lng() if s.center.coordinates[0] isnt c.lng()
@@ -164,7 +164,7 @@ angular.module('uiGmapgoogle-maps.directives.api')
164164

165165
updateCenter()
166166

167-
if !_.isUndefined(s.bounds) and !_.contains(disabledEvents, 'bounds')
167+
if !_.isUndefined(s.bounds) and !_.includes(disabledEvents, 'bounds')
168168
s.bounds.northeast =
169169
latitude: ne.lat()
170170
longitude: ne.lng()
@@ -173,7 +173,7 @@ angular.module('uiGmapgoogle-maps.directives.api')
173173
latitude: sw.lat()
174174
longitude: sw.lng()
175175

176-
if not _.contains(disabledEvents, 'zoom')
176+
if not _.includes(disabledEvents, 'zoom')
177177
s.zoom = _gMap.zoom
178178
scope.idleAndZoomChanged = !scope.idleAndZoomChanged
179179
settingFromDirective = false

src/coffee/directives/api/utils/events-helper.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ angular.module("uiGmapgoogle-maps.directives.api.utils")
1616
if eventObj?
1717
_.compact _.map eventObj.events, (eventHandler, eventName) ->
1818
if ignores
19-
doIgnore = _(ignores).contains(eventName) #ignores to be invoked by internal listeners
19+
doIgnore = _(ignores).includes(eventName) #ignores to be invoked by internal listeners
2020
if eventObj.events.hasOwnProperty(eventName) and angular.isFunction(eventObj.events[eventName]) and !doIgnore
2121
google.maps.event.addListener gObject, eventName, ->
2222
#$scope.$evalAsync must exist, I have tried null checking, underscore key checking. Nothing works but having a real or fake $evalAsync

src/coffee/directives/api/utils/model-key.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ angular.module('uiGmapgoogle-maps.directives.api.utils')
2222
GmapUtil.getPath(model, modelKey)
2323

2424
modelKeyComparison: (model1, model2) =>
25-
hasCoords = _.contains(@interface.scopeKeys, 'coords')
25+
hasCoords = _.includes(@interface.scopeKeys, 'coords')
2626
scope = @scope if hasCoords and @scope.coords? or not hasCoords
2727
if not scope? then throw 'No scope set!'
2828
if hasCoords

src/coffee/extensions/lodash.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ angular.module('uiGmapgoogle-maps.extensions')
118118
return false
119119
# if (nativeIndexOf && obj.indexOf == nativeIndexOf)
120120
# return obj.indexOf(target) != -1
121-
_.any obj, (value) =>
121+
_.some obj, (value) =>
122122
if comparison?
123123
comparison value, target
124124
else

0 commit comments

Comments
 (0)