swap ENVIRONMENT_IS_* functions for Utils named exports

This commit is contained in:
d98762625 2019-07-05 10:17:52 +01:00
parent c70f14419a
commit 1c24c05647
41 changed files with 117 additions and 141 deletions

View file

@ -5,7 +5,9 @@
*/
import Operation from "../Operation";
import {fromHex} from "../lib/Hex";
import { fromHex } from "../lib/Hex";
import { isWorkerEnvironment } from "../Utils";
/**
* From Hexdump operation
@ -55,7 +57,7 @@ class FromHexdump extends Operation {
const w = (width - 13) / 4;
// w should be the specified width of the hexdump and therefore a round number
if (Math.floor(w) !== w || input.indexOf("\r") !== -1 || output.indexOf(13) !== -1) {
if (ENVIRONMENT_IS_WORKER()) self.setOption("attemptHighlight", false);
if (isWorkerEnvironment()) self.setOption("attemptHighlight", false);
}
return output;
}