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:
6
node_modules/es5-ext/array/#/concat/implement.js
generated
vendored
Normal file
6
node_modules/es5-ext/array/#/concat/implement.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
if (!require('./is-implemented')()) {
|
||||
Object.defineProperty(Array.prototype, 'concat', { value: require('./shim'),
|
||||
configurable: true, enumerable: false, writable: true });
|
||||
}
|
||||
4
node_modules/es5-ext/array/#/concat/index.js
generated
vendored
Normal file
4
node_modules/es5-ext/array/#/concat/index.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./is-implemented')() ?
|
||||
Array.prototype.concat : require('./shim');
|
||||
7
node_modules/es5-ext/array/#/concat/is-implemented.js
generated
vendored
Normal file
7
node_modules/es5-ext/array/#/concat/is-implemented.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var SubArray = require('../../_sub-array-dummy-safe');
|
||||
|
||||
module.exports = function () {
|
||||
return (new SubArray()).concat('foo') instanceof SubArray;
|
||||
};
|
||||
39
node_modules/es5-ext/array/#/concat/shim.js
generated
vendored
Normal file
39
node_modules/es5-ext/array/#/concat/shim.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
|
||||
var isPlainArray = require('../../is-plain-array')
|
||||
, toPosInt = require('../../../number/to-pos-integer')
|
||||
, isObject = require('../../../object/is-object')
|
||||
|
||||
, isArray = Array.isArray, concat = Array.prototype.concat
|
||||
, forEach = Array.prototype.forEach
|
||||
|
||||
, isSpreadable;
|
||||
|
||||
isSpreadable = function (value) {
|
||||
if (!value) return false;
|
||||
if (!isObject(value)) return false;
|
||||
if (value['@@isConcatSpreadable'] !== undefined) {
|
||||
return Boolean(value['@@isConcatSpreadable']);
|
||||
}
|
||||
return isArray(value);
|
||||
};
|
||||
|
||||
module.exports = function (item/*, …items*/) {
|
||||
var result;
|
||||
if (!this || !isArray(this) || isPlainArray(this)) {
|
||||
return concat.apply(this, arguments);
|
||||
}
|
||||
result = new this.constructor(this.length);
|
||||
forEach.call(this, function (val, i) { result[i] = val; });
|
||||
forEach.call(arguments, function (arg) {
|
||||
var base;
|
||||
if (isSpreadable(arg)) {
|
||||
base = result.length;
|
||||
result.length += toPosInt(arg.length);
|
||||
forEach.call(arg, function (val, i) { result[base + i] = val; });
|
||||
return;
|
||||
}
|
||||
result.push(arg);
|
||||
});
|
||||
return result;
|
||||
};
|
||||
Reference in New Issue
Block a user