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

get-scroll-info

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-scroll-info - npm Package Compare versions

Comparing version 0.1.11 to 0.2.0

build/cjs/src/__tests__/testGetScrollInfo.js

16

build/cjs/src/index.js

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

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

@@ -27,3 +27,3 @@ var _typeof2 = _interopRequireDefault(require("reshow-runtime/helpers/typeof"));

oWin = (0, _winDoc.win)();
isWebkit = _reshowConstant.UNDEFINED !== (0, _typeof2.default)(oDoc.webkitIsFullScreen);
isWebkit = _reshowConstant.UNDEFINED !== (0, _typeof2["default"])(oDoc.webkitIsFullScreen);
docEl = oDoc.documentElement;

@@ -48,3 +48,3 @@ };

if (!el.id) {
el.id = 'scroll-info-' + domCount;
el.id = "scroll-info-" + domCount;
domCount++;

@@ -67,4 +67,4 @@ }

var h;
var nodeName = (el.nodeName || '').toLowerCase();
var isRoot = 'body' === nodeName || 'html' === nodeName;
var nodeName = (el.nodeName || "").toLowerCase();
var isRoot = "body" === nodeName || "html" === nodeName;

@@ -101,4 +101,4 @@ if (isRoot) {

top: scrollTop,
right: scrollRight,
bottom: scrollBottom,
right: w > scrollWidth ? scrollWidth : scrollRight,
bottom: h > scrollHeight ? scrollHeight : scrollBottom,
left: scrollLeft

@@ -111,2 +111,2 @@ };

var _default = getScrollInfo;
exports.default = _default;
exports["default"] = _default;
import _typeof from "reshow-runtime/es/helpers/typeof";
import { doc, win } from 'win-doc';
import { UNDEFINED } from 'reshow-constant';
import { doc, win } from "win-doc";
import { UNDEFINED } from "reshow-constant";
var lastScrollStore = {};

@@ -34,3 +34,3 @@ var oDoc;

if (!el.id) {
el.id = 'scroll-info-' + domCount;
el.id = "scroll-info-" + domCount;
domCount++;

@@ -51,4 +51,4 @@ }

var h;
var nodeName = (el.nodeName || '').toLowerCase();
var isRoot = 'body' === nodeName || 'html' === nodeName;
var nodeName = (el.nodeName || "").toLowerCase();
var isRoot = "body" === nodeName || "html" === nodeName;

@@ -85,4 +85,4 @@ if (isRoot) {

top: scrollTop,
right: scrollRight,
bottom: scrollBottom,
right: w > scrollWidth ? scrollWidth : scrollRight,
bottom: h > scrollHeight ? scrollHeight : scrollBottom,
left: scrollLeft

@@ -89,0 +89,0 @@ };

{
"name": "get-scroll-info",
"version": "0.1.11",
"version": "0.2.0",
"description": "Get Scroll Information",

@@ -19,11 +19,14 @@ "repository": "react-atomic/react-atomic-organism",

"chai": "*",
"jsdom": "*",
"jsdom-global": "*",
"mocha": "*"
},
"scripts": {
"clean": "find ./build -name '*.*' | xargs rm -rf",
"build:cjs": "BABEL_ENV=build babel src -d build/cjs/src --root-mode upward",
"build:es": "BABEL_ENV=es babel src -d build/es/src --root-mode upward",
"build:test": "BABEL_ENV=build babel tests -d build/tests --root-mode upward",
"build": "rm -rf build && npm run build:cjs && npm run build:es",
"prepublishOnly": "npm run build",
"test": "npm run build && npm run build:test && mocha 'build/tests/**/*.js'"
"build": "npm run clean && npm run build:cjs && npm run build:es",
"prepublishOnly": "npm run test",
"mocha": "mocha -r jsdom-global/register 'build/cjs/**/__tests__/*.js'",
"test": "npm run build && npm run mocha"
},

@@ -30,0 +33,0 @@ "files": [

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