mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 02:42:48 +00:00
updated bunch of file paths and changed the way posts are loaded
This commit is contained in:
33
node_modules/sliced/lib/sliced.js
generated
vendored
Normal file
33
node_modules/sliced/lib/sliced.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
/**
|
||||
* An Array.prototype.slice.call(arguments) alternative
|
||||
*
|
||||
* @param {Object} args something with a length
|
||||
* @param {Number} slice
|
||||
* @param {Number} sliceEnd
|
||||
* @api public
|
||||
*/
|
||||
|
||||
module.exports = function (args, slice, sliceEnd) {
|
||||
var ret = [];
|
||||
var len = args.length;
|
||||
|
||||
if (0 === len) return ret;
|
||||
|
||||
var start = slice < 0
|
||||
? Math.max(0, slice + len)
|
||||
: slice || 0;
|
||||
|
||||
if (sliceEnd !== undefined) {
|
||||
len = sliceEnd < 0
|
||||
? sliceEnd + len
|
||||
: sliceEnd
|
||||
}
|
||||
|
||||
while (len-- > start) {
|
||||
ret[len - start] = args[len];
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user