]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/array/#/find-index/shim.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / node-gyp / node_modules / path-array / node_modules / array-index / node_modules / es6-symbol / node_modules / es5-ext / array / # / find-index / shim.js
1 'use strict';
2
3 var callable = require('../../../object/valid-callable')
4   , value    = require('../../../object/valid-value')
5
6   , some = Array.prototype.some, apply = Function.prototype.apply;
7
8 module.exports = function (predicate/*, thisArg*/) {
9         var k, self;
10         self = Object(value(this));
11         callable(predicate);
12
13         return some.call(self, function (value, index) {
14                 if (apply.call(predicate, this, arguments)) {
15                         k = index;
16                         return true;
17                 }
18                 return false;
19         }, arguments[1]) ? k : -1;
20 };