tahamajs's picture
download
raw
615 Bytes
define(['./_getLength', './contains'], function (_getLength, contains) {
// Produce an array that contains every item shared between all the
// passed-in arrays.
function intersection(array) {
var result = [];
var argsLength = arguments.length;
for (var i = 0, length = _getLength(array); i < length; i++) {
var item = array[i];
if (contains(result, item)) continue;
var j;
for (j = 1; j < argsLength; j++) {
if (!contains(arguments[j], item)) break;
}
if (j === argsLength) result.push(item);
}
return result;
}
return intersection;
});

Xet Storage Details

Size:
615 Bytes
·
Xet hash:
78ac941c0fad83ca99a87190a5339409a088919622ad7718079d76793759db0f

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.