mirror of
https://github.com/serratus/quaggaJS.git
synced 2026-08-13 05:31:37 +08:00
Fixed tests
This commit is contained in:
@@ -12,10 +12,9 @@ const windowObjects = [
|
||||
];
|
||||
|
||||
const DOMHelper = windowObjects.reduce((result, obj) => {
|
||||
return {
|
||||
...result,
|
||||
return Object.assign({}, result, {
|
||||
[obj]: obj in windowRef ? windowRef[obj] : () => {}
|
||||
};
|
||||
});
|
||||
}, {});
|
||||
|
||||
DOMHelper.setObject = (key, value) => {
|
||||
|
||||
@@ -324,15 +324,14 @@ EANReader.prototype._decode = function() {
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
return Object.assign({
|
||||
code: result.join(""),
|
||||
start: startInfo.start,
|
||||
end: code.end,
|
||||
codeset: "",
|
||||
startInfo: startInfo,
|
||||
decodedCodes: decodedCodes,
|
||||
...resultInfo
|
||||
};
|
||||
}, resultInfo);
|
||||
};
|
||||
|
||||
EANReader.prototype._decodeExtensions = function(offset) {
|
||||
|
||||
+3
-7
@@ -345,13 +345,9 @@ function createScanner() {
|
||||
}
|
||||
|
||||
function configForWorker(config) {
|
||||
return {
|
||||
...config,
|
||||
inputStream: {
|
||||
...config.inputStream,
|
||||
target: null
|
||||
}
|
||||
};
|
||||
return Object.assign({}, config, {
|
||||
inputStream: Object.assign({}, config.inputStream, {target: null})
|
||||
});
|
||||
}
|
||||
|
||||
function workerInterface(factory) {
|
||||
|
||||
Reference in New Issue
Block a user