Support array input
This commit is contained in:
parent
b0d79af3d9
commit
c72146a554
1 changed files with 5 additions and 11 deletions
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue