* @function LevelRenderer.Tool.Util.prototype.indexOf * @description 查询数组中元素的index * @return {Object} 偏移量。
(array, value)
| 248 | * @return {Object} 偏移量。 |
| 249 | */ |
| 250 | indexOf(array, value) { |
| 251 | if (array.indexOf) { |
| 252 | return array.indexOf(value); |
| 253 | } |
| 254 | for (var i = 0, len = array.length; i < len; i++) { |
| 255 | if (array[i] === value) { |
| 256 | return i; |
| 257 | } |
| 258 | } |
| 259 | return -1; |
| 260 | } |
| 261 | |
| 262 | |
| 263 | /** |
no outgoing calls
no test coverage detected