Socket
Socket
Sign inDemoInstall

@livelybone/scroll-get

Package Overview
Dependencies
0
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 2.0.0

lib/es/index.js

16

package.json
{
"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'))
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc