mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
update more ENVIRONMENT_IS_* calls after merge, update some test paths, comments. Remove vulnerability
This commit is contained in:
parent
368f508b17
commit
e03ff22ba8
10 changed files with 31 additions and 19 deletions
|
@ -1154,17 +1154,24 @@ class Utils {
|
|||
|
||||
/**
|
||||
* Check whether the code is running in a Node.js environment
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isNodeEnvironment() {
|
||||
return typeof process !== "undefined" && process.versions != null && process.versions.node != null;
|
||||
}
|
||||
|
||||
/** */
|
||||
/**
|
||||
* Check whether the code is running in a web environment
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isWebEnvironment() {
|
||||
return typeof window === "object";
|
||||
}
|
||||
|
||||
/** */
|
||||
/**
|
||||
* Check whether the code is running in a worker
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isWorkerEnvironment() {
|
||||
return typeof importScripts === "function";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue