@livelybone/scroll-get
Advanced tools
Comparing version 1.0.0 to 2.0.0
{ | ||
"name": "@livelybone/scroll-get", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "A module for get left/top distance to client or page of element", | ||
"main": "./lib/index.js", | ||
"main": "./lib/umd/index.js", | ||
"module": "./lib/es/index.js", | ||
"unpkg": "./lib/umd/index.js", | ||
"scripts": { | ||
"build": "./node_modules/.bin/webpack --progress --mode production", | ||
"eslint": "./node_modules/.bin/eslint ./src", | ||
"test": "./node_modules/.bin/mocha ./test/index.spec.js" | ||
"build": "rimraf ./lib && rollup -c", | ||
"eslint": "eslint ./src", | ||
"test": "npm run build && mocha ./test/index.spec.js" | ||
}, | ||
@@ -31,5 +33,5 @@ "repository": { | ||
"mocha": "^5.2.0", | ||
"webpack": "^4.16.2", | ||
"webpack-command": "^0.4.1" | ||
"rollup": "^0.65.1", | ||
"rollup-plugin-uglify": "^5.0.2" | ||
} | ||
} |
@@ -10,2 +10,16 @@ # @livelybone/scroll-get | ||
## TODO | ||
## Installation | ||
```bash | ||
npm i -S @livelybone/scroll-get | ||
``` | ||
## Usage | ||
```js | ||
/** | ||
* @result {pageLeft:Number, pageTop:Number}|{clientLeft:Number, clientTop:Number} | ||
* */ | ||
import {posRelativeToPage, posRelativeToClient} from '@livleybone/scroll-get' | ||
var pos = posRelativeToPage(document.getElementById('id')) | ||
var pos1 = posRelativeToClient(document.getElementById('id')) | ||
``` |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
4739
6
50
24
0
1