mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 18:52:50 +00:00
updated bunch of file paths and changed the way posts are loaded
This commit is contained in:
29
node_modules/es5-ext/array/#/e-index-of.js
generated
vendored
Normal file
29
node_modules/es5-ext/array/#/e-index-of.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
var toPosInt = require('../../number/to-pos-integer')
|
||||
, value = require('../../object/valid-value')
|
||||
|
||||
, indexOf = Array.prototype.indexOf
|
||||
, hasOwnProperty = Object.prototype.hasOwnProperty
|
||||
, abs = Math.abs, floor = Math.floor;
|
||||
|
||||
module.exports = function (searchElement/*, fromIndex*/) {
|
||||
var i, l, fromIndex, val;
|
||||
if (searchElement === searchElement) { //jslint: ignore
|
||||
return indexOf.apply(this, arguments);
|
||||
}
|
||||
|
||||
l = toPosInt(value(this).length);
|
||||
fromIndex = arguments[1];
|
||||
if (isNaN(fromIndex)) fromIndex = 0;
|
||||
else if (fromIndex >= 0) fromIndex = floor(fromIndex);
|
||||
else fromIndex = toPosInt(this.length) - floor(abs(fromIndex));
|
||||
|
||||
for (i = fromIndex; i < l; ++i) {
|
||||
if (hasOwnProperty.call(this, i)) {
|
||||
val = this[i];
|
||||
if (val !== val) return i; //jslint: ignore
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
Reference in New Issue
Block a user