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.2.1 to 0.3.0

types/index.d.ts

38

build/cjs/src/index.js

@@ -8,20 +8,52 @@ "use strict";

//@ts-check
var defaultObj = {
__null: true
};
/**
* @param {object|undefined} w
* @param {object} def
* @returns {object}
*/
var doc = function doc(w, def) {
if (w === void 0) {
w = _reshowConstant.T_UNDEFINED;
}
if (def === void 0) {
def = defaultObj;
}
var oDoc = (w || win()).document;
return _reshowConstant.UNDEFINED !== typeof oDoc ? oDoc : def || defaultObj;
return _reshowConstant.UNDEFINED !== typeof oDoc ? oDoc : def;
};
/**
* @param {string} key
* @returns {boolean}
*/
exports.doc = doc;
var hasWin = function hasWin(key) {
return !win()[key || "__null"];
if (key === void 0) {
key = "__null";
}
return !win()[key];
};
/**
* @param {object} def
* @returns {object}
*/
exports.hasWin = hasWin;
var win = function win(def) {
if (def === void 0) {
def = defaultObj;
}
return (

@@ -32,3 +64,3 @@ /**

*/
"undefined" !== typeof window ? window : def || defaultObj
"undefined" !== typeof window ? window : def
);

@@ -35,0 +67,0 @@ };

7

package.json
{
"version": "0.2.1",
"version": "0.3.0",
"name": "win-doc",

@@ -31,3 +31,4 @@ "repository": {

"build:es": "BABEL_ENV=es babel src -d build/es/src --out-file-extension .mjs --root-mode upward",
"build": "npm run clean && npm run build:cjs && npm run build:es",
"build:type": "npx -p typescript tsc src/*.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --declarationDir types",
"build": "npm run clean && npm run build:cjs && npm run build:es && npm run build:type",
"mochaFor": "mocha -r global-jsdom/register",

@@ -38,3 +39,5 @@ "mocha": "npm run mochaFor -- 'build/es/**/__tests__/*.mjs'",

},
"types": "./types/index.d.ts",
"files": [
"types",
"build",

@@ -41,0 +44,0 @@ "package.json",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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