Socket
Socket
Sign inDemoInstall

@os-design/media

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@os-design/media - npm Package Compare versions

Comparing version 1.0.15 to 1.0.16

9

dist/cjs/index.js
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", {

@@ -38,5 +37,3 @@ value: true

});
var _media = _interopRequireWildcard(require("./media"));
Object.keys(_media).forEach(function (key) {

@@ -53,14 +50,8 @@ if (key === "default" || key === "__esModule") return;

});
var _useIsMaxWidth = _interopRequireDefault(require("./useIsMaxWidth"));
var _useIsMinWidth = _interopRequireDefault(require("./useIsMinWidth"));
var _useIsWidth = _interopRequireDefault(require("./useIsWidth"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
//# sourceMappingURL=index.js.map

@@ -7,11 +7,6 @@ "use strict";

exports["default"] = void 0;
var _react = require("react");
var _media = require("../media");
var _useIsWidth = _interopRequireDefault(require("../useIsWidth"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**

@@ -27,5 +22,4 @@ * Checks whether the width of the screen is less than or equal to

};
var _default = useIsMaxWidth;
exports["default"] = _default;
//# sourceMappingURL=index.js.map

@@ -7,11 +7,6 @@ "use strict";

exports["default"] = void 0;
var _react = require("react");
var _media = require("../media");
var _useIsWidth = _interopRequireDefault(require("../useIsWidth"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**

@@ -27,5 +22,4 @@ * Checks whether the width of the screen is greater than or equal to

};
var _default = useIsMinWidth;
exports["default"] = _default;
//# sourceMappingURL=index.js.map

21

dist/cjs/useIsWidth/index.js

@@ -7,17 +7,9 @@ "use strict";

exports["default"] = void 0;
var _react = require("react");
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
/**

@@ -29,10 +21,8 @@ * Checks whether the width of the screen matches the condition

var detectorRef = (0, _react.useRef)(detector);
var _useState = (0, _react.useState)(function () {
return detector(typeof window !== 'undefined' ? window.innerWidth : 0);
}),
_useState2 = _slicedToArray(_useState, 2),
flag = _useState2[0],
setFlag = _useState2[1];
return detector(typeof window !== 'undefined' ? window.innerWidth : 0);
}),
_useState2 = _slicedToArray(_useState, 2),
flag = _useState2[0],
setFlag = _useState2[1];
var updateFlag = (0, _react.useCallback)(function () {

@@ -53,5 +43,4 @@ setFlag(detectorRef.current(window.innerWidth));

};
var _default = useIsWidth;
exports["default"] = _default;
//# sourceMappingURL=index.js.map
import { useCallback } from 'react';
import { maxBreakpoints } from '../media';
import useIsWidth from '../useIsWidth';
/**

@@ -8,3 +9,2 @@ * Checks whether the width of the screen is less than or equal to

*/
const useIsMaxWidth = breakpoint => {

@@ -14,4 +14,3 @@ const detector = useCallback(width => width <= maxBreakpoints[breakpoint], [breakpoint]);

};
export default useIsMaxWidth;
//# sourceMappingURL=index.js.map
import { useCallback } from 'react';
import { minBreakpoints } from '../media';
import useIsWidth from '../useIsWidth';
/**

@@ -8,3 +9,2 @@ * Checks whether the width of the screen is greater than or equal to

*/
const useIsMinWidth = breakpoint => {

@@ -14,4 +14,3 @@ const detector = useCallback(width => width >= minBreakpoints[breakpoint], [breakpoint]);

};
export default useIsMinWidth;
//# sourceMappingURL=index.js.map
import { useCallback, useEffect, useRef, useState } from 'react';
/**

@@ -6,3 +7,2 @@ * Checks whether the width of the screen matches the condition

*/
const useIsWidth = detector => {

@@ -24,4 +24,3 @@ const detectorRef = useRef(detector);

};
export default useIsWidth;
//# sourceMappingURL=index.js.map
{
"name": "@os-design/media",
"version": "1.0.15",
"version": "1.0.16",
"license": "UNLICENSED",

@@ -34,3 +34,3 @@ "repository": "git@gitlab.com:os-team/libs/os-design.git",

},
"gitHead": "174987fc6c9d55db201be10abde3a4cf5a790573"
"gitHead": "8cb28f6719d699c014fbce91d832a9ff06abe515"
}

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

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

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

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