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

win-doc

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

win-doc - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3

22

build/cjs/src/index.js

@@ -5,15 +5,14 @@ "use strict";

exports.win = exports.hasWin = exports.doc = void 0;
var _reshowConstant = require("reshow-constant");
//@ts-check
//@ts-check
var defaultObj = {
__null: true
};
/**
* @param {object|undefined} w
* @param {object} def
* @param {any} def
* @returns {document}
*/
var doc = function doc(w, def) {

@@ -23,10 +22,9 @@ if (w === void 0) {

}
if (def === void 0) {
def = defaultObj;
}
var oDoc = (w || win()).document;
return _reshowConstant.UNDEFINED !== typeof oDoc ? oDoc : def;
};
/**

@@ -36,6 +34,3 @@ * @param {string} key

*/
exports.doc = doc;
var hasWin = function hasWin(key) {

@@ -45,13 +40,10 @@ if (key === void 0) {

}
return !win()[key];
};
/**
* @param {object} def
* @param {any} def
* @returns {window}
*/
exports.hasWin = hasWin;
var win = function win(def) {

@@ -61,3 +53,2 @@ if (def === void 0) {

}
return (

@@ -71,3 +62,2 @@ /**

};
exports.win = win;
{
"version": "0.3.2",
"version": "0.3.3",
"name": "win-doc",

@@ -4,0 +4,0 @@ "repository": {

/**
* @param {object|undefined} w
* @param {object} def
* @param {any} def
* @returns {document}
*/
export function doc(w?: object | undefined, def?: object): Document;
export function doc(w?: object | undefined, def?: any): Document;
/**
* @param {object} def
* @param {any} def
* @returns {window}
*/
export function win(def?: object): Window & typeof globalThis;
export function win(def?: any): Window & typeof globalThis;
/**

@@ -13,0 +13,0 @@ * @param {string} key

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