Comparing version 0.0.9 to 0.1.0
@@ -18,2 +18,5 @@ "use strict"; | ||
}); | ||
it("test has win", function () { | ||
(0, _chai.expect)((0, _index.hasWin)()).to.be["true"]; | ||
}); | ||
}); |
@@ -40,2 +40,6 @@ "use strict"; | ||
}); | ||
it("test has win", function () { | ||
var w = (0, _index.win)(); | ||
(0, _chai.expect)((0, _index.hasWin)()).to.be["false"]; | ||
}); | ||
}); |
@@ -8,3 +8,3 @@ "use strict"; | ||
}); | ||
exports.win = exports.doc = void 0; | ||
exports.win = exports.hasWin = exports.doc = void 0; | ||
@@ -27,2 +27,8 @@ var _typeof2 = _interopRequireDefault(require("reshow-runtime/helpers/typeof")); | ||
var hasWin = function hasWin(key) { | ||
return !win()[key || "__null"]; | ||
}; | ||
exports.hasWin = hasWin; | ||
var win = function win() { | ||
@@ -29,0 +35,0 @@ var def = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultObj; |
@@ -1,2 +0,2 @@ | ||
import { win, doc } from "../index"; | ||
import { win, doc, hasWin } from "../index"; | ||
import { expect } from "chai"; | ||
@@ -14,2 +14,5 @@ describe("Test doc", function () { | ||
}); | ||
it("test has win", function () { | ||
expect(hasWin()).to.be["true"]; | ||
}); | ||
}); |
@@ -1,2 +0,2 @@ | ||
import { win, doc } from "../index.js"; | ||
import { win, doc, hasWin } from "../index.js"; | ||
import { expect } from "chai"; | ||
@@ -33,2 +33,6 @@ import jsdom from "jsdom-global"; | ||
}); | ||
it("test has win", function () { | ||
var w = win(); | ||
expect(hasWin()).to.be["false"]; | ||
}); | ||
}); |
@@ -13,2 +13,6 @@ import _typeof from "reshow-runtime/es/helpers/typeof"; | ||
var hasWin = function hasWin(key) { | ||
return !win()[key || "__null"]; | ||
}; | ||
var win = function win() { | ||
@@ -25,2 +29,2 @@ var def = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultObj; | ||
export { doc, win }; | ||
export { doc, win, hasWin }; |
{ | ||
"name": "win-doc", | ||
"version": "0.0.9", | ||
"version": "0.1.0", | ||
"description": "Simple to avoid global not found error", | ||
@@ -5,0 +5,0 @@ "repository": "react-atomic/react-atomic-organism", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5955
161