Рефакторинг, плюс небольшие изменения - подготовка к использованию внешних конвертеров

This commit is contained in:
Book Pauk
2019-02-27 19:30:04 +07:00
parent 61cfee222f
commit d3ff0edbff
6 changed files with 38 additions and 22 deletions

View File

@@ -3,9 +3,9 @@ const iconv = require('iconv-lite');
class ConvertFb2 extends ConvertBase {
check(data, opts) {
const {fileType} = opts;
const {dataType} = opts;
return (fileType && fileType.ext == 'xml' && data.toString().indexOf('<FictionBook') >= 0);
return (dataType && dataType.ext == 'xml' && data.toString().indexOf('<FictionBook') >= 0);
}
run(data, opts) {