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.3 to 1.4.4

.github/workflows/nodejs.yml

8

.eslintrc.json

@@ -7,3 +7,3 @@ {

"es6": true,
"mocha": true
"jest": true
},

@@ -16,7 +16,9 @@ "extends": [

"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
"SharedArrayBuffer": "readonly",
"ElementMeasurer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018
"ecmaVersion": 2018,
"sourceType": "module"
},

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

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

## [1.4.4] - 2019-12-31
- Changed test tool to "jest" and "ts-jest". #7
## [1.4.2] - 2019-10-17
### Updated
- Update dependencies.

@@ -60,3 +62,5 @@

[Unreleased]: https://github.com/archco/element-measurer/compare/v1.4.0...HEAD
[Unreleased]: https://github.com/archco/element-measurer/compare/v1.4.4...HEAD
[1.4.4]: https://github.com/archco/element-measurer/compare/v1.4.2...v1.4.4
[1.4.2]: https://github.com/archco/element-measurer/compare/v1.4.0...v1.4.2
[1.4.0]: https://github.com/archco/element-measurer/compare/v1.3.0...v1.4.0

@@ -63,0 +67,0 @@ [1.3.0]: https://github.com/archco/element-measurer/compare/v1.2.0...v1.3.0

{
"name": "element-measurer",
"version": "1.4.3",
"description": "The javascript library class for measures size of Element.",
"version": "1.4.4",
"description": "A javascript class that provides convenience for measuring size to target such as element or document.",
"main": "dist/element-measurer.js",

@@ -11,3 +11,3 @@ "types": "element-measurer.d.ts",

"scripts": {
"test": "mocha \"./test/*.spec.js\"",
"test": "jest",
"build": "webpack --hide-modules",

@@ -31,21 +31,21 @@ "watch": "npm run build -- --watch"

"devDependencies": {
"@types/chai": "^4.2.7",
"@types/chai-as-promised": "^7.1.2",
"@types/mocha": "^5.2.7",
"@types/jest": "^24.0.25",
"@types/puppeteer": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^2.11.0",
"@typescript-eslint/parser": "^2.11.0",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"eslint": "^6.7.2",
"mocha": "^6.2.2",
"@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.3",
"webpack": "^4.41.2",
"typescript": "^3.7.4",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10",
"webpack-merge": "^4.2.2",
"webpack-notifier": "^1.8.0"
},
"jest": {
"preset": "ts-jest"
}
}

@@ -7,3 +7,3 @@ # ElementMeasurer

The javascript library class for measures size of Element.
A javascript class that provides convenience for measuring size to target such as element or document.

@@ -21,3 +21,3 @@ ## Install

// Measures on a element.
// Measures on an element.
// target: HTMLElement | 'selector' | document | window

@@ -28,3 +28,3 @@ const targetSize = new ElementMeasurer('#target');

// Measures on the whole Document.
const docSize = new ElementMeasurer(document);
const docSize = new ElementMeasurer();
docSize.scrollTop = 200; // set scrollTop.

@@ -54,10 +54,10 @@ ```

- Syntax
Syntax
``` js
elementMeasurer.setTarget(target);
```
``` js
elementMeasurer.setTarget(target);
```
- Param `Element|String|Window|Document` target
- Returns `ElementMeasurer`
- @param `Element|String|Window|Document` target
- @returns `ElementMeasurer`

@@ -68,9 +68,9 @@ #### getOffset

- Syntax
Syntax
``` js
let obj = elementMeasurer.getOffset();
```
``` js
let obj = elementMeasurer.getOffset();
```
- Returns `Object` { top, left }
- @returns `Object` { top, left }

@@ -81,9 +81,9 @@ #### getRect

- Syntax
Syntax
``` js
let domRect = elementMeasurer.getRect();
```
``` js
let domRect = elementMeasurer.getRect();
```
- Returns [`DOMRect`](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect#Properties)
- @returns [`DOMRect`](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect#Properties)

@@ -90,0 +90,0 @@ ## License

@@ -8,3 +8,4 @@ {

"noImplicitAny": true,
"sourceMap": true
"sourceMap": true,
"esModuleInterop": true
},

@@ -11,0 +12,0 @@ "include": [

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