@lskjs/utils
Advanced tools
Comparing version 0.35.2 to 0.35.5
{ | ||
"name": "@lskjs/utils", | ||
"version": "0.35.2", | ||
"version": "0.35.5", | ||
"description": "LSK ux subrepo: utils", | ||
@@ -5,0 +5,0 @@ "author": "Igor Suvorov <hi@isuvorov.com>", |
@@ -12,8 +12,20 @@ "use strict"; | ||
if (typeof __DEV__ === 'undefined' && !globalOrWindow.__DEV__) { | ||
globalOrWindow.__DEV__ = false; | ||
} // globalOrWindow.__WEBVIEW__ = !globalOrWindow.__SERVER__; | ||
if (globalOrWindow.__SERVER__) { | ||
globalOrWindow.__DEV__ = process.env.NODE_ENV !== 'production'; | ||
} else { | ||
globalOrWindow.__DEV__ = false; | ||
} | ||
} | ||
globalOrWindow.__DEV__ = !!globalOrWindow.__DEV__; | ||
globalOrWindow.__PROD__ = !globalOrWindow.__DEV__; | ||
if (!globalOrWindow.__STAGE__ && !globalOrWindow.__STAGE__) { | ||
globalOrWindow.__STAGE__ = 'stage'; | ||
if (!globalOrWindow.__STAGE__) { | ||
if (globalOrWindow.__SERVER__) { | ||
globalOrWindow.__STAGE__ = process.env.STAGE; | ||
} | ||
if (!globalOrWindow.__STAGE__) { | ||
globalOrWindow.__STAGE__ = 'development'; | ||
} | ||
} // if (__SERVER__) { | ||
@@ -69,3 +81,3 @@ // process.on('unhandledRejection', (err) => { | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9wb2x5ZmlsbC5qcyJdLCJuYW1lcyI6WyJnbG9iYWxPcldpbmRvdyIsIndpbmRvdyIsImdsb2JhbCIsIl9fU0VSVkVSX18iLCJfX0NMSUVOVF9fIiwiX19ERVZfXyIsIl9fU1RBR0VfXyIsImNvbnNvbGUiLCJsb2ciLCJzdGFydGVkQXQiLCJEYXRlIiwibm93IiwidGltaW5nIiwiX2JhYmVsUG9seWZpbGwiLCJyZXF1aXJlIiwicmVhZHkiLCJjYiJdLC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oIWdsb2JhbC5fYmFiZWxQb2x5ZmlsbCkge1xuICByZXF1aXJlKCdAYmFiZWwvcG9seWZpbGwnKTtcbn1cbi8vIC8vIHJlcXVpcmUoJ0BiYWJlbC9wb2x5ZmlsbCcpO1xuLy8gLy8gcmVxdWlyZSgnZXZlbnQtc291cmNlLXBvbHlmaWxsJyk7XG4vLyAvLyBnbG9iYWwuZmV0Y2ggPSByZXF1aXJlKCcuL2ZldGNoJykuZGVmYXVsdDtcblxuLy8gaWYgKHR5cGVvZiB3aW5kb3cgIT09ICd1bmRlZmluZWQnKSB7XG4vLyAgIHdpbmRvdy5tYXRjaE1lZGlhID0gd2luZG93Lm1hdGNoTWVkaWEgfHwgZnVuY3Rpb24gKCkge1xuLy8gICAgIHJldHVybiB7XG4vLyAgICAgICBtYXRjaGVzOiBmYWxzZSxcbi8vICAgICAgIGFkZExpc3RlbmVyKCkge30sXG4vLyAgICAgICByZW1vdmVMaXN0ZW5lcigpIHt9LFxuLy8gICAgIH07XG4vLyAgIH07XG4vLyB9XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIHJlYWR5KGNiKSB7XG4gIGlmIChfX0RFVl9fKSB7XG4gICAgY29uc29sZS5sb2coYPCflKUgIENvbXBpbGVkIFske2dsb2JhbC50aW1pbmcoKX1tc11gKTsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby1jb25zb2xlXG4gIH1cbiAgaWYgKHR5cGVvZiBjYiA9PT0gJ2Z1bmN0aW9uJykgY2IoKTtcbn1cbiJdfQ== | ||
//# sourceMappingURL=polyfill.js.map |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
264646
1851
3