diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:01:11 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:02:09 +0200 |
commit | 363723fc84f7b8477592e0105aeb331ec9a017af (patch) | |
tree | 29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/core-js/modules/es6.array.last-index-of.js | |
parent | 5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff) | |
download | wallet-core-363723fc84f7b8477592e0105aeb331ec9a017af.tar.xz |
node_modules
Diffstat (limited to 'node_modules/core-js/modules/es6.array.last-index-of.js')
-rw-r--r-- | node_modules/core-js/modules/es6.array.last-index-of.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/node_modules/core-js/modules/es6.array.last-index-of.js b/node_modules/core-js/modules/es6.array.last-index-of.js index 75c1eabfa..1f70e340d 100644 --- a/node_modules/core-js/modules/es6.array.last-index-of.js +++ b/node_modules/core-js/modules/es6.array.last-index-of.js @@ -1,22 +1,22 @@ 'use strict'; -var $export = require('./_export') - , toIObject = require('./_to-iobject') - , toInteger = require('./_to-integer') - , toLength = require('./_to-length') - , $native = [].lastIndexOf - , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +var $native = [].lastIndexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; $export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) - lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){ + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { // convert -0 to +0 - if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0; - var O = toIObject(this) - , length = toLength(O.length) - , index = length - 1; - if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1])); - if(index < 0)index = length + index; - for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0; + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this); + var length = toLength(O.length); + var index = length - 1; + if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); + if (index < 0) index = length + index; + for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; return -1; } -});
\ No newline at end of file +}); |