BVB Source Codes

reactide Show es6.array.last-index-of.js Source code

Return Download reactide: download es6.array.last-index-of.js Source code - Download reactide Source code - Type:.js
  1. 'use strict';
  2. var $export       = require('./_export')
  3.   , toIObject     = require('./_to-iobject')
  4.   , toInteger     = require('./_to-integer')
  5.   , toLength      = require('./_to-length')
  6.   , $native       = [].lastIndexOf
  7.   , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;
  8.  
  9. $export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', {
  10.   // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
  11.   lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){
  12.     // convert -0 to +0
  13.     if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0;
  14.     var O      = toIObject(this)
  15.       , length = toLength(O.length)
  16.       , index  = length - 1;
  17.     if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1]));
  18.     if(index < 0)index = length + index;
  19.     for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0;
  20.     return -1;
  21.   }
  22. });
downloades6.array.last-index-of.js Source code - Download reactide Source code
Related Source Codes/Software:
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
postal - 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top