You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@reach/utils

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.1 to 0.1.2

es/lib/IdContext.js

22

es/index.js
var checkedPkgs = {};
export var checkStyles = function checkStyles(pkg) {
// only check once per package
if (checkedPkgs[pkg]) return;
checkedPkgs[pkg] = true;
var checkStyles = function checkStyles() {};
if (parseInt(window.getComputedStyle(document.body).getPropertyValue("--reach-" + pkg), 10) !== 1) {
console.warn("@reach/" + pkg + " styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:\n\n import \"@reach/" + pkg + "/styles.css\";\n\n Otherwise you'll need to include them some other way:\n\n <link rel=\"stylesheet\" type=\"text/css\" href=\"node_modules/@reach/" + pkg + "/styles.css\" />\n\n For more information visit https://ui.reach.tech/styling.\n ");
}
};
if (process.env.NODE_ENV !== "production") {
checkStyles = function checkStyles(pkg) {
// only check once per package
if (checkedPkgs[pkg]) return;
checkedPkgs[pkg] = true;
if (parseInt(window.getComputedStyle(document.body).getPropertyValue("--reach-" + pkg), 10) !== 1) {
console.warn("@reach/" + pkg + " styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:\n\n import \"@reach/" + pkg + "/styles.css\";\n\n Otherwise you'll need to include them some other way:\n\n <link rel=\"stylesheet\" type=\"text/css\" href=\"node_modules/@reach/" + pkg + "/styles.css\" />\n\n For more information visit https://ui.reach.tech/styling.\n ");
}
};
}
export { checkStyles };
export var wrapEvent = function wrapEvent(handler, cb) {

@@ -14,0 +20,0 @@ return function (event) {

@@ -6,12 +6,17 @@ "use strict";

var checkStyles = exports.checkStyles = function checkStyles(pkg) {
// only check once per package
if (checkedPkgs[pkg]) return;
checkedPkgs[pkg] = true;
var checkStyles = function checkStyles() {};
if (parseInt(window.getComputedStyle(document.body).getPropertyValue("--reach-" + pkg), 10) !== 1) {
console.warn("@reach/" + pkg + " styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:\n\n import \"@reach/" + pkg + "/styles.css\";\n\n Otherwise you'll need to include them some other way:\n\n <link rel=\"stylesheet\" type=\"text/css\" href=\"node_modules/@reach/" + pkg + "/styles.css\" />\n\n For more information visit https://ui.reach.tech/styling.\n ");
}
};
if (process.env.NODE_ENV !== "production") {
exports.checkStyles = checkStyles = function checkStyles(pkg) {
// only check once per package
if (checkedPkgs[pkg]) return;
checkedPkgs[pkg] = true;
if (parseInt(window.getComputedStyle(document.body).getPropertyValue("--reach-" + pkg), 10) !== 1) {
console.warn("@reach/" + pkg + " styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:\n\n import \"@reach/" + pkg + "/styles.css\";\n\n Otherwise you'll need to include them some other way:\n\n <link rel=\"stylesheet\" type=\"text/css\" href=\"node_modules/@reach/" + pkg + "/styles.css\" />\n\n For more information visit https://ui.reach.tech/styling.\n ");
}
};
}
exports.checkStyles = checkStyles;
var wrapEvent = exports.wrapEvent = function wrapEvent(handler, cb) {

@@ -18,0 +23,0 @@ return function (event) {

{
"name": "@reach/utils",
"version": "0.1.1",
"version": "0.1.2",
"description": "Internal, shared utilities for Reach UI.",

@@ -5,0 +5,0 @@ "main": "index.js",

let checkedPkgs = {};
export let checkStyles = pkg => {
// only check once per package
if (checkedPkgs[pkg]) return;
checkedPkgs[pkg] = true;
let checkStyles = () => {};
if (
parseInt(
window.getComputedStyle(document.body).getPropertyValue(`--reach-${pkg}`),
10
) !== 1
) {
console.warn(
`@reach/${pkg} styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:
if (__DEV__) {
checkStyles = pkg => {
// only check once per package
if (checkedPkgs[pkg]) return;
checkedPkgs[pkg] = true;
if (
parseInt(
window
.getComputedStyle(document.body)
.getPropertyValue(`--reach-${pkg}`),
10
) !== 1
) {
console.warn(
`@reach/${pkg} styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:
import "@reach/${pkg}/styles.css";

@@ -25,6 +30,9 @@

`
);
}
};
);
}
};
}
export { checkStyles };
export let wrapEvent = (handler, cb) => event => {

@@ -31,0 +39,0 @@ handler && handler(event);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc