MCPcopy
hub / github.com/lumapps/lumX / _arrayObjectIndexOf

Function _arrayObjectIndexOf

components/select/js/select_directive.js:130–138  ·  view source on GitHub ↗

* Returns the object index in an array. * * @param {Array} arr The array to check in. * @param {Object} obj The object to check. * @return {number} The object index.

(arr, obj)

Source from the content-addressed store, hash-verified

128 * @return {number} The object index.
129 */
130 function _arrayObjectIndexOf(arr, obj) {
131 for (let i = 0, len = arr.length; i < len; i++) {
132 if (angular.equals(obj, arr[i])) {
133 return i;
134 }
135 }
136
137 return -1;
138 }
139
140 /**
141 * Init view value.

Callers 4

_updateModelFunction · 0.85
_updateViewValueFunction · 0.85
displaySelectedFunction · 0.85
isSelectedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected