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

@injex/stdlib

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@injex/stdlib - npm Package Compare versions

Comparing version 3.3.3 to 3.3.4

12

lib/utils.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.yieldToMain = exports.getConstructorName = exports.isPromise = exports.isFunction = exports.toCamelCase = void 0;
var _document = (function () {
try {
return window.document;
}
catch (e) {
// this is not a browser context
return null;
}
})();
function toCamelCase(str) {

@@ -21,2 +30,5 @@ return str[0].toLowerCase() + str.slice(1);

function yieldToMain() {
if (_document === null || _document === void 0 ? void 0 : _document.hidden) {
return Promise.resolve();
}
return new Promise(function (resolve) { return setTimeout(resolve, 0); });

@@ -23,0 +35,0 @@ }

4

package.json
{
"name": "@injex/stdlib",
"version": "3.3.3",
"version": "3.3.4",
"description": "",

@@ -50,3 +50,3 @@ "keywords": [],

},
"gitHead": "4077d8c20fff22509ca074996b87987a12141c73"
"gitHead": "9fb36b9aa2307628d300b8a870cb0d62517cded4"
}

@@ -0,1 +1,10 @@

const _document = (function () {
try {
return window.document;
} catch (e) {
// this is not a browser context
return null;
}
})();
export function toCamelCase(str: string): string {

@@ -18,3 +27,7 @@ return str[0].toLowerCase() + str.slice(1);

export function yieldToMain(): Promise<void> {
if (_document?.hidden) {
return Promise.resolve();
}
return new Promise((resolve) => setTimeout(resolve, 0));
}

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