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

element-measurer

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

element-measurer - npm Package Compare versions

Comparing version 1.4.4 to 1.4.5

.github/workflows/node.js.yml

3

.eslintrc.json

@@ -20,4 +20,3 @@ {

"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
"ecmaVersion": 2018
},

@@ -24,0 +23,0 @@ "plugins": [

@@ -10,2 +10,6 @@ # Changelog

## 1.4.5 - 2022-02-15
- Update dependencies.
## [1.4.4] - 2019-12-31

@@ -12,0 +16,0 @@

@@ -11,100 +11,46 @@ (function webpackUniversalModuleDefinition(root, factory) {

})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
return /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "./src/element-measurer.ts");
/******/ })
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
/******/ ({
/***/ "./src/element-measurer.ts":
var __webpack_exports__ = {};
/*!*********************************!*\
!*** ./src/element-measurer.ts ***!
\*********************************/
/*! exports provided: ElementMeasurer, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElementMeasurer", function() { return ElementMeasurer; });
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ElementMeasurer": () => (/* binding */ ElementMeasurer),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/**

@@ -138,3 +84,3 @@ * The library class that can measures size of element.

},
enumerable: true,
enumerable: false,
configurable: true

@@ -155,3 +101,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -172,3 +118,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -194,3 +140,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -216,3 +162,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -231,3 +177,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -246,3 +192,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -261,3 +207,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -276,3 +222,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -331,9 +277,8 @@ });

/* harmony default export */ __webpack_exports__["default"] = (ElementMeasurer);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ElementMeasurer);
/***/ })
/******/ });
/******/ return __webpack_exports__;
/******/ })()
;
});
//# sourceMappingURL=element-measurer.js.map

@@ -1,5 +0,2 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ElementMeasurer=t():e.ElementMeasurer=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="./src/element-measurer.ts")}({"./src/element-measurer.ts":
/*!*********************************!*\
!*** ./src/element-measurer.ts ***!
\*********************************/
/*! exports provided: ElementMeasurer, default */function(e,t,r){"use strict";r.r(t),r.d(t,"ElementMeasurer",(function(){return n}));var n=function(){function e(e){void 0===e&&(e=document.documentElement),this.setTarget(e)}return Object.defineProperty(e.prototype,"isDocument",{get:function(){return this.target===document.documentElement||this.target===document.body},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clientWidth",{get:function(){return this.isDocument?window.innerWidth:this.getRect().width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clientHeight",{get:function(){return this.isDocument?window.innerHeight:this.getRect().height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.isDocument?window.pageYOffset:this.target.scrollTop},set:function(e){this.isDocument?window.scrollTo(this.scrollLeft,e):this.target.scrollTop=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollLeft",{get:function(){return this.isDocument?window.pageXOffset:this.target.scrollLeft},set:function(e){this.isDocument?window.scrollTo(e,this.scrollTop):this.target.scrollLeft=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollWidth",{get:function(){return this.target.scrollWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollHeight",{get:function(){return this.target.scrollHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollTop",{get:function(){return this.scrollHeight-this.clientHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollLeft",{get:function(){return this.scrollWidth-this.clientWidth},enumerable:!0,configurable:!0}),e.prototype.setTarget=function(e){if(e instanceof HTMLElement||e instanceof Element)this.target=e;else if(e===window||e===document)this.target=document.documentElement;else{if("string"!=typeof e)throw new TypeError("Target value is not correct type.");this.target=document.querySelector(e)}return this},e.prototype.getOffset=function(){for(var e=this.target,t=0,r=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)r+=e.offsetLeft-e.scrollLeft,t+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{top:t,left:r}},e.prototype.getRect=function(){return this.target.getBoundingClientRect()},e}();t.default=n}})}));
/*! For license information please see element-measurer.min.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ElementMeasurer=t():e.ElementMeasurer=t()}(this,(function(){return(()=>{"use strict";var e={d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ElementMeasurer:()=>o,default:()=>r});var o=function(){function e(e){void 0===e&&(e=document.documentElement),this.setTarget(e)}return Object.defineProperty(e.prototype,"isDocument",{get:function(){return this.target===document.documentElement||this.target===document.body},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientWidth",{get:function(){return this.isDocument?window.innerWidth:this.getRect().width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientHeight",{get:function(){return this.isDocument?window.innerHeight:this.getRect().height},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.isDocument?window.pageYOffset:this.target.scrollTop},set:function(e){this.isDocument?window.scrollTo(this.scrollLeft,e):this.target.scrollTop=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrollLeft",{get:function(){return this.isDocument?window.pageXOffset:this.target.scrollLeft},set:function(e){this.isDocument?window.scrollTo(e,this.scrollTop):this.target.scrollLeft=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrollWidth",{get:function(){return this.target.scrollWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrollHeight",{get:function(){return this.target.scrollHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollTop",{get:function(){return this.scrollHeight-this.clientHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollLeft",{get:function(){return this.scrollWidth-this.clientWidth},enumerable:!1,configurable:!0}),e.prototype.setTarget=function(e){if(e instanceof HTMLElement||e instanceof Element)this.target=e;else if(e===window||e===document)this.target=document.documentElement;else{if("string"!=typeof e)throw new TypeError("Target value is not correct type.");this.target=document.querySelector(e)}return this},e.prototype.getOffset=function(){for(var e=this.target,t=0,o=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)o+=e.offsetLeft-e.scrollLeft,t+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{top:t,left:o}},e.prototype.getRect=function(){return this.target.getBoundingClientRect()},e}();const r=o;return t})()}));

@@ -0,0 +0,0 @@ export as namespace ElementMeasurer;

{
"name": "element-measurer",
"version": "1.4.4",
"version": "1.4.5",
"description": "A javascript class that provides convenience for measuring size to target such as element or document.",

@@ -11,5 +11,5 @@ "main": "dist/element-measurer.js",

"scripts": {
"test": "jest",
"build": "webpack --hide-modules",
"watch": "npm run build -- --watch"
"test": "jest --detectOpenHandles",
"build": "webpack",
"watch": "webpack --watch"
},

@@ -31,17 +31,17 @@ "repository": {

"devDependencies": {
"@types/jest": "^24.0.25",
"@types/puppeteer": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^2.14.0",
"@typescript-eslint/parser": "^2.14.0",
"eslint": "^6.8.0",
"jest": "^24.9.0",
"puppeteer": "^2.0.0",
"source-map-loader": "^0.2.4",
"ts-jest": "^24.2.0",
"ts-loader": "^6.2.1",
"typescript": "^3.7.4",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10",
"webpack-merge": "^4.2.2",
"webpack-notifier": "^1.8.0"
"@types/jest": "^27.4.0",
"@types/puppeteer": "^5.4.4",
"@typescript-eslint/eslint-plugin": "^5.12.0",
"@typescript-eslint/parser": "^5.12.0",
"eslint": "^8.9.0",
"jest": "^27.5.1",
"puppeteer": "^13.3.2",
"source-map-loader": "^3.0.1",
"ts-jest": "^27.1.3",
"ts-loader": "^9.2.6",
"typescript": "^4.5.5",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2",
"webpack-merge": "^5.8.0",
"webpack-notifier": "^1.15.0"
},

@@ -48,0 +48,0 @@ "jest": {

# ElementMeasurer
[![Build Status](https://travis-ci.org/archco/element-measurer.svg?branch=master)](https://travis-ci.org/archco/element-measurer)
[![Build Status](https://github.com/archco/element-measurer/actions/workflows/node.js.yml/badge.svg)](https://github.com/archco/element-measurer)
[![npm version](https://badge.fury.io/js/element-measurer.svg)](https://www.npmjs.com/package/element-measurer)

@@ -5,0 +5,0 @@ [![Downloads](https://img.shields.io/npm/dm/element-measurer.svg)](https://www.npmjs.com/package/element-measurer)

const path = require('path');
const merge = require('webpack-merge');
const { merge } = require('webpack-merge');
const WebpackNotifierPlugin = require('webpack-notifier');

@@ -4,0 +4,0 @@

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