Support array input

This commit is contained in:
YUKI "Piro" Hiroshi 2019-04-18 13:42:21 +09:00
parent b0d79af3d9
commit c72146a554

View file

@ -186,23 +186,17 @@ Diff.prototype = {
|| (this.options.ignoreCase && left.toLowerCase() === right.toLowerCase());
}
},
removeEmpty(array) {
let ret = [];
for (let i = 0; i < array.length; i++) {
if (array[i]) {
ret.push(array[i]);
}
}
return ret;
removeEmpty(value) {
return value;
},
castInput(value) {
return value;
},
tokenize(value) {
return value.split('');
return value.slice();
},
join(chars) {
return chars.join('');
join(value) {
return value;
}
};