Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lskjs/utils

Package Overview
Dependencies
Maintainers
7
Versions
235
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lskjs/utils - npm Package Compare versions

Comparing version 0.35.49 to 0.35.51

global.js

2

package.json
{
"name": "@lskjs/utils",
"version": "0.35.49",
"version": "0.35.51",
"description": "LSK ux subrepo: utils",

@@ -5,0 +5,0 @@ "author": "Igor Suvorov <hi@isuvorov.com>",

"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {

@@ -7,40 +9,5 @@ value: true

exports["default"] = ready;
var globalOrWindow = typeof window !== 'undefined' ? window : global;
globalOrWindow.__SERVER__ = typeof window === 'undefined';
globalOrWindow.__CLIENT__ = !globalOrWindow.__SERVER__;
if (typeof __DEV__ === 'undefined' && !globalOrWindow.__DEV__) {
if (globalOrWindow.__SERVER__) {
globalOrWindow.__DEV__ = process.env.NODE_ENV !== 'production';
} else {
globalOrWindow.__DEV__ = false;
}
}
var _global = _interopRequireDefault(require("./global"));
globalOrWindow.__DEV__ = !!globalOrWindow.__DEV__;
globalOrWindow.__PROD__ = !globalOrWindow.__DEV__;
if (!globalOrWindow.__STAGE__) {
if (globalOrWindow.__SERVER__) {
globalOrWindow.__STAGE__ = process.env.STAGE;
}
if (!globalOrWindow.__STAGE__) {
globalOrWindow.__STAGE__ = 'development';
}
} // if (__SERVER__) {
// process.on('unhandledRejection', (err) => {
// console.error('Promise: Unhandled Rejection'); // eslint-disable-line
// console.error(err.stack); //eslint-disable-line
// if (typeof err.message === 'string' &&
// err.message.indexOf('reason: socket hang up') !== -1) {
// console.error('socket hang up => process.exit'); // eslint-disable-line
// process.exit(1);
// // process.kill();
// }
// // application specific logging, throwing an error, or other logic here
// });
// }
if (__DEV__) {

@@ -50,6 +17,6 @@ console.log('Compiling ...'); // eslint-disable-line no-console

global.startedAt = Date.now();
_global["default"].startedAt = Date.now();
global.timing = function () {
return Date.now() - global.startedAt;
_global["default"].timing = function () {
return Date.now() - _global["default"].startedAt;
}; // if (!global.Promise) global.Promise = require('bluebird');

@@ -59,3 +26,3 @@ // if (!global.fetch) global.fetch = require('isomorphic-fetch');

if (!global._babelPolyfill) {
if (!_global["default"]._babelPolyfill) {
require('@babel/polyfill');

@@ -78,3 +45,3 @@ } // // require('@babel/polyfill');

if (__DEV__) {
console.log("\uD83D\uDD25 Compiled [".concat(global.timing(), "ms]")); // eslint-disable-line no-console
console.log("\uD83D\uDD25 Compiled [".concat(_global["default"].timing(), "ms]")); // eslint-disable-line no-console
}

@@ -84,3 +51,3 @@

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9wb2x5ZmlsbC5qcyJdLCJuYW1lcyI6WyJnbG9iYWxPcldpbmRvdyIsIndpbmRvdyIsImdsb2JhbCIsIl9fU0VSVkVSX18iLCJfX0NMSUVOVF9fIiwiX19ERVZfXyIsInByb2Nlc3MiLCJlbnYiLCJOT0RFX0VOViIsIl9fUFJPRF9fIiwiX19TVEFHRV9fIiwiU1RBR0UiLCJjb25zb2xlIiwibG9nIiwic3RhcnRlZEF0IiwiRGF0ZSIsIm5vdyIsInRpbWluZyIsIl9iYWJlbFBvbHlmaWxsIiwicmVxdWlyZSIsInJlYWR5IiwiY2IiXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLElBQU1BLGNBQWMsR0FBRyxPQUFPQyxNQUFQLEtBQWtCLFdBQWxCLEdBQWdDQSxNQUFoQyxHQUF5Q0MsTUFBaEU7QUFDQUYsY0FBYyxDQUFDRyxVQUFmLEdBQTRCLE9BQU9GLE1BQVAsS0FBa0IsV0FBOUM7QUFDQUQsY0FBYyxDQUFDSSxVQUFmLEdBQTRCLENBQUNKLGNBQWMsQ0FBQ0csVUFBNUM7O0FBRUEsSUFBSSxPQUFPRSx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HdpbmRvdyAhPT0gJ3VuZGVmaW5lZCcpIHtcbi8vICAgd2luZG93Lm1hdGNoTWVkaWEgPSB3aW5kb3cubWF0Y2hNZWRpYSB8fCBmdW5jdGlvbiAoKSB7XG4vLyAgICAgcmV0dXJuIHtcbi8vICAgICAgIG1hdGNoZXM6IGZhbHNlLFxuLy8gICAgICAgYWRkTGlzdGVuZXIoKSB7fSxcbi8vICAgICAgIHJlbW92ZUxpc3RlbmVyKCkge30sXG4vLyAgICAgfTtcbi8vICAgfTtcbi8vIH1cblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gcmVhZHkoY2IpIHtcbiAgaWYgKF9fREVWX18pIHtcbiAgICBjb25zb2xlLmxvZyhg8J+UpSAgQ29tcGlsZWQgWyR7Z2xvYmFsLnRpbWluZygpfW1zXWApOyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLWNvbnNvbGVcbiAgfVxuICBpZiAodHlwZW9mIGNiID09PSAnZnVuY3Rpb24nKSBjYigpO1xufVxuIl19
//# sourceMappingURL=polyfill.js.map

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc