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

@ndla/util

Package Overview
Dependencies
Maintainers
9
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ndla/util - npm Package Compare versions

Comparing version 0.4.4 to 0.4.5

5

es/createUniversalPortal.js

@@ -1,3 +0,1 @@

import { jsx as ___EmotionJSX } from "@emotion/core";
/**

@@ -13,2 +11,3 @@ * Copyright (c) 2016-present, NDLA.

import ReactDOM from 'react-dom';
import { jsx as ___EmotionJSX } from "@emotion/core";

@@ -28,3 +27,3 @@ var canUseDOM = function canUseDOM() {

var el = document.querySelector(selector);
return ReactDOM.createPortal(children, el);
return /*#__PURE__*/ReactDOM.createPortal(children, el);
}

14

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

@@ -8,4 +10,2 @@ value: true

var _core = require("@emotion/core");
var React = _interopRequireWildcard(require("react"));

@@ -15,6 +15,10 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _core = require("@emotion/core");
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
/**

@@ -41,3 +45,3 @@ * Copyright (c) 2016-present, NDLA.

var el = document.querySelector(selector);
return _reactDom.default.createPortal(children, el);
return /*#__PURE__*/_reactDom["default"].createPortal(children, el);
}

@@ -9,3 +9,3 @@ /**

import * as React from 'react';
declare const getComponentName: (component: React.ComponentClass<{}, any>) => string;
declare const getComponentName: (component: React.ComponentClass) => string;
export default getComponentName;

@@ -6,3 +6,3 @@ "use strict";

});
exports.default = void 0;
exports["default"] = void 0;

@@ -21,2 +21,2 @@ /**

var _default = getComponentName;
exports.default = _default;
exports["default"] = _default;

@@ -6,3 +6,3 @@ "use strict";

});
exports.breakpoints = exports.default = void 0;
exports.breakpoints = exports["default"] = void 0;

@@ -20,3 +20,3 @@ var getCurrentBreakpoint = function getCurrentBreakpoint() {

var _default = getCurrentBreakpoint;
exports.default = _default;
exports["default"] = _default;
var breakpoints = {

@@ -23,0 +23,0 @@ mobile: 'mobile',

@@ -12,6 +12,6 @@ /**

export { default as noScroll } from './noScroll';
export { default as getCurrentBreakpoint, breakpoints, } from './getCurrentBreakpoint';
export { default as getCurrentBreakpoint, breakpoints } from './getCurrentBreakpoint';
export { createUniversalPortal } from './createUniversalPortal';
export { isFunction } from './isFunction';
export { resizeObserver } from './resizeObserver';
export { setCookie, getCookie, deleteCookie, isValidCookie, } from './cookieHandler';
export { setCookie, getCookie, deleteCookie, isValidCookie } from './cookieHandler';
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
Object.defineProperty(exports, "__esModule", {

@@ -9,3 +11,3 @@ value: true

get: function get() {
return _uuid.default;
return _uuid["default"];
}

@@ -16,3 +18,3 @@ });

get: function get() {
return _getComponentName.default;
return _getComponentName["default"];
}

@@ -29,3 +31,3 @@ });

get: function get() {
return _noScroll.default;
return _noScroll["default"];
}

@@ -36,3 +38,3 @@ });

get: function get() {
return _getCurrentBreakpoint.default;
return _getCurrentBreakpoint["default"];
}

@@ -107,4 +109,6 @@ });

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -8,2 +8,2 @@ /**

*/
export declare function isFunction(object: any): boolean;
export declare function isFunction(object: any): any;

@@ -6,3 +6,3 @@ "use strict";

});
exports.default = void 0;
exports["default"] = void 0;
var scrollbarWidth = null;

@@ -67,2 +67,2 @@

var _default = noScroll;
exports.default = _default;
exports["default"] = _default;

@@ -6,3 +6,3 @@ "use strict";

});
exports.default = void 0;
exports["default"] = void 0;

@@ -26,2 +26,2 @@ /**

var _default = uuid;
exports.default = _default;
exports["default"] = _default;
{
"name": "@ndla/util",
"version": "0.4.4",
"version": "0.4.5",
"description": "Collection of util functions used by NDLA",

@@ -34,3 +34,3 @@ "license": "GPL-3.0",

},
"gitHead": "407ef7d7c090ec2b2cdd35a40aeeefea13816786"
"gitHead": "fe8489e6c8013937cf6920d99d5b35c671172671"
}
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