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

@meteor-it/utils

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@meteor-it/utils - npm Package Compare versions

Comparing version 1.3.20 to 1.3.21

8

index.js

@@ -350,8 +350,8 @@ "use strict";

function isBrowserEnvironment() {
if (isNodeEnvironmentCache !== null)
return isNodeEnvironmentCache;
return isNodeEnvironmentCache = _isBrowserEnvironment();
if (isBrowserEnvironmentCache !== null)
return isBrowserEnvironmentCache;
return isBrowserEnvironmentCache = _isBrowserEnvironment();
}
exports.isBrowserEnvironment = isBrowserEnvironment;
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInhwcmVzcy9ub2RlX21vZHVsZXMvQG1ldGVvci1pdC91dGlscy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLG1DQUFrQztBQUVsQyxxQ0FBcUM7QUFDckMsU0FBZ0IsZ0JBQWdCLENBQUMsTUFBYyxFQUFFLE9BQU8sR0FBRyxFQUFFO0lBQ3pELE9BQU8sSUFBSSxXQUFXLENBQUMsTUFBTSxFQUFFLE9BQU8sQ0FBQyxDQUFDO0FBQzVDLENBQUM7QUFGRCw0Q0FFQztBQUVELHFDQUFxQztBQUNyQyxTQUFnQixrQkFBa0IsQ0FBQyxNQUFnQixFQUFFLFVBQWtCLENBQUM7SUFDcEUsT0FBTyxJQUFJLE9BQU8sQ0FBQyxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsRUFBRTtRQUM1QixNQUFNLElBQUksR0FBUSxFQUFFLENBQUM7UUFDckIsSUFBSSxJQUFJLEdBQUcsQ0FBQyxDQUFDO1FBQ2IsTUFBTSxDQUFDLEVBQUUsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxDQUFDLEVBQUU7WUFDbEIsS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k6IGFueVtdIHtcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFycmF5Lmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIGNvbnN0IHZhbHVlID0gYXJyYXlbaV07XG5cbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkodmFsdWUpKSB7XG4gICAgICAgICAgICBmbGF0dGVuKHZhbHVlLCByZXN1bHQpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIHJlc3VsdDtcbn1cblxuLyoqXG4gKiBAZGVwcmVjYXRlZFxuICogQHBhcmFtIGFycmF5XG4gKi9cbmV4cG9ydCBmdW5jdGlvbiByZW1vdmVEdXBsaWNhdGVzPFQ+KGFycmF5OiBUW10pOiBUW10ge1xuICAgIHJldHVybiBBcnJheS5mcm9tKG5ldyBTZXQoYXJyYXkpKTtcbn1cblxuLyoqXG4gKiBAZGVwcmVjYXRlZFxuICogQHBhcmFtIGFycmF5MVxuICogQHBhcmFtIGFycmF5MlxuICovXG5leHBvcnQgZnVuY3Rpb24gbWl4KGFycmF5MTogYW55W10gfCBPYmplY3QsIGFycmF5MjogYW55W10gfCBPYmplY3QpOiBhbnkge1xuICAgIGxldCBvdXQ6IGFueTtcbiAgICBpZiAoYXJyYXkxIGluc3RhbmNlb2YgQXJyYXkpIHtcbiAgICAgICAgb3V0ID0gW107XG4gICAgICAgIGZvciAobGV0IGluZGV4IGluIGFycmF5MSkge1xuICAgICAgICAgICAgb3V0LnB1c2goW2FycmF5MVtpbmRleF0sIChhcnJheTIgYXMgYW55KVtpbmRleF1dKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gb3V0O1xuICAgIH0gZWxzZSB7XG4gICAgICAgIG91dCA9IHt9O1xuICAgICAgICBmb3IgKGxldCBrZXkgaW4gYXJyYXkxKSB7XG4gICAgICAgICAgICAvLyBub2luc3BlY3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ZGVwcmVjYXRlZFxuICogQHBhcmFtIGFycmF5XG4gKi9cbmV4cG9ydCBmdW5jdGlvbiByZW1vdmVEdXBsaWNhdGVzPFQ+KGFycmF5OiBUW10pOiBUW10ge1xuICAgIHJldHVybiBBcnJheS5mcm9tKG5ldyBTZXQoYXJyYXkpKTtcbn1cblxuLyoqXG4gKiBAZGVwcmVjYXRlZFxuICogQHBhcmFtIGFycmF5MVxuICogQHBhcmFtIGFycmF5MlxuICovXG5leHBvcnQgZnVuY3Rpb24gbWl4KGFycmF5MTogYW55W10gfCBPYmplY3QsIGFycmF5MjogYW55W10gfCBPYmplY3QpOiBhbnkge1xuICAgIGxldCBvdXQ6IGFueTtcbiAgICBpZiAoYXJyYXkxIGluc3RhbmNlb2YgQXJyYXkpIHtcbiAgICAgICAgb3V0ID0gW107XG4gICAgICAgIGZvciAobGV0IGluZGV4IGluIGFycmF5MSkge1xuICAgICAgICAgICAgb3V0LnB1c2goW2FycmF5MVtpbmRleF0sIChhcnJheTIgYXMgYW55KVtpbmRleF1dKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gb3V0O1xuICAgIH0gZWxzZSB7XG4gICAgICAgIG91dCA9IHt9O1xuICAgICAgICBmb3IgKGxldCBrZXkgaW4gYXJyYXkxKSB7XG4gICAgICAgICAgICAvLyBub2luc3BlY3Rpb24gSlNVbmZpbHRlcmVkRm9ySW5Mb29wXG4gICAgICAgICAgICBvdXRba2V5XSA9IChhcnJheTEgYXMgYW55KVtrZXldO1xuICAgICAgICB9XG4gICAgICAgIGZvciAobGV0IGtleSBpbiBhcnJheTIpIHtcbiAgICAgICAgICAgIC8vIG5vaW5zcGVjdGlvbiBKU1VuZmlsdGVyZWRGb3JJbkxvb3BcbiAgICAgICAgICAgIG91dFtrZXldID0gKGFycmF5MiBhcyBhbnkpW2tleV07XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG91dDtcbiAgICB9XG59XG5cbi8qKlxuICogQGRlcHJlY2F0ZWRcbiAq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AgIGlmICh0eXBlb2YgX193ZWJwYWNrX3JlcXVpcmVfXyA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgLy8gRGlyZWN0IGJ5cGFzcyBmb3Igd2VicGFjayt0ZXJzZXJcbiAgICAgICAgICAgIGlmIChwcm9jZXNzLmVudi5CUk9XU0VSKVxuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9IGNhdGNoIChlKSB7IH1cbiAgICB9XG4gICAgaWYgKHR5cGVvZiB3aW5kb3cgIT09ICd1bmRlZmluZWQnICYmIHdpbmRvdy5kb2N1bWVudClcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgcmV0dXJuICFpc05vZGVFbnZpcm9ubWVudCgpO1xufVxubGV0IGlzQnJvd3NlckVudmlyb25tZW50Q2FjaGUgPSBudWxsO1xuZXhwb3J0IGZ1bmN0aW9uIGlzQnJvd3NlckVudmlyb25tZW50KCkge1xuICAgIGlmIChpc0Jyb3dzZXJFbnZpcm9ubWVudENhY2hlICE9PSBudWxsKVxuICAgICAgICByZXR1cm4gaXNCcm93c2VyRW52aXJvbm1lbnRDYWNoZTtcbiAgICByZXR1cm4gaXNCcm93c2VyRW52aXJvbm1lbnRDYWNoZSA9IF9pc0Jyb3dzZXJFbnZpcm9ubWVudCgpO1xufVxuIl19

@@ -219,3 +219,3 @@ import { Readable } from 'stream';

});
return <any>Promise.all(waitings);
return Promise.all(waitings) as any;
}

@@ -354,5 +354,5 @@

export function isBrowserEnvironment() {
if (isNodeEnvironmentCache !== null)
return isNodeEnvironmentCache;
return isNodeEnvironmentCache = _isBrowserEnvironment();
if (isBrowserEnvironmentCache !== null)
return isBrowserEnvironmentCache;
return isBrowserEnvironmentCache = _isBrowserEnvironment();
}
{
"name": "@meteor-it/utils",
"version": "1.3.20",
"version": "1.3.21",
"description": "Many useful utils",

@@ -17,3 +17,3 @@ "module": "index.mjs",

},
"gitHead": "a02c563e3a2962c0db1695939c892f4e2bc97ba3"
"gitHead": "aa048e00bbd468ea4d2e58e8b24bc03b2d556a41"
}

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