Version 1
[yaffs-website] / node_modules / core-js / library / modules / es6.array.index-of.js
1 'use strict';
2 var $export       = require('./_export')
3   , $indexOf      = require('./_array-includes')(false)
4   , $native       = [].indexOf
5   , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;
6
7 $export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', {
8   // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
9   indexOf: function indexOf(searchElement /*, fromIndex = 0 */){
10     return NEGATIVE_ZERO
11       // convert -0 to +0
12       ? $native.apply(this, arguments) || 0
13       : $indexOf(this, searchElement, arguments[1]);
14   }
15 });