lib/vendor/sugar.js
function(f, startIndex, loop) {
      var index = arrayFind(this, f, startIndex, loop, true);
      return isUndefined(index) ? -1 : index;
    }
function(f, startIndex, loop) {
      var index = arrayFind(this, f, startIndex, loop, true);
      return isUndefined(index) ? -1 : index;
    }
function ( f , startIndex , loop ) { var index = arrayFind ( this , f , startIndex , loop , true ) ; return isUndefined ( index ) ? - 1 : index ; }
*
@method findIndex(<f>, [startIndex] = 0, [loop] = false)
@returns Number
@short Returns the index of the first element that matches <f> or -1 if not found.
@extra This method has a few notable differences to native %indexOf%. Although <f> will similarly match a primitive such as a string or number, it will also match deep objects and arrays that are not equal by reference (%===%). Additionally, if a function is passed it will be run as a matching function (similar to the behavior of %Array#filter%) rather than attempting to find that function itself by reference in the array. Starts at [index], and will continue once from index = 0 if [loop] is true. This method implements @array_matching.
@example

+   [1,2,3,4].findIndex(3);  -> 2
+   [1,2,3,4].findIndex(function(n) {
return n % 2 == 0;
}); -> 1
+   ['one','two','three'].findIndex(/th/); -> 2

*
* @method findIndex ( <f > [ startIndex ] = 0 [ loop ] = false ) @returns Number @short Returns the index of the first element that matches <f > or - 1 if not found . @extra This method has a few notable differences to native %indexOf% . Although <f > will similarly match a primitive such as a string or number it will also match deep objects and arrays that are not equal by reference ( % === % ) . Additionally if a function is passed it will be run as a matching function ( similar to the behavior of %Array#filter% ) rather than attempting to find that function itself by reference in the array . Starts at [ index ] and will continue once from index = 0 if [ loop ] is true . This method implements @array_matching . @example