mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 07:16:17 -04:00
swap ENVIRONMENT_IS_* functions for Utils named exports
This commit is contained in:
parent
c70f14419a
commit
1c24c05647
41 changed files with 117 additions and 141 deletions
|
@ -7,6 +7,7 @@
|
|||
import Operation from "../Operation";
|
||||
import OperationError from "../errors/OperationError";
|
||||
import notepack from "notepack.io";
|
||||
import { isWorkerEnvironment } from "../Utils";
|
||||
|
||||
/**
|
||||
* To MessagePack operation
|
||||
|
@ -35,7 +36,7 @@ class ToMessagePack extends Operation {
|
|||
*/
|
||||
run(input, args) {
|
||||
try {
|
||||
if (ENVIRONMENT_IS_WORKER()) {
|
||||
if (isWorkerEnvironment()) {
|
||||
return notepack.encode(input);
|
||||
} else {
|
||||
const res = notepack.encode(input);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue