Sha256: ecd3dba03508b2d36202db11ee080431ab4394010e520afebf20313cdc4798bc

Contents?: true

Size: 821 Bytes

Versions: 3

Compression:

Stored size: 821 Bytes

Contents

/* Implement indexOf ourselves as IE does not support it */
if (!Array.prototype.indexOf)
{
  Array.prototype.indexOf = function(searchElement /*, fromIndex */)
  {
    "use strict";

    if (this === void 0 || this === null)
      throw new TypeError();

    var t = Object(this);
    var len = t.length >>> 0;
    if (len === 0)
      return -1;

    var n = 0;
    if (arguments.length > 0)
    {
      n = Number(arguments[1]);
      if (n !== n)
        n = 0;
      else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0))
        n = (n > 0 || -1) * Math.floor(Math.abs(n));
    }

    if (n >= len)
      return -1;

    var k = n >= 0
          ? n
          : Math.max(len - Math.abs(n), 0);

    for (; k < len; k++)
    {
      if (k in t && t[k] === searchElement)
        return k;
    }
    return -1;
  };
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rich_cms-3.0.2 assets/jzip/native/extensions.js
rich_cms-3.0.1 assets/jzip/native/extensions.js
rich_cms-3.0.0 assets/jzip/native/extensions.js