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

react-scroll-to-top

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

react-scroll-to-top - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

10

lib/ScrollToTop.js
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = require("react");
var react_1 = __importStar(require("react"));
function scrollToTop() {

@@ -12,3 +19,2 @@ document.documentElement.scrollTop = 0;

document.addEventListener("scroll", onScroll);
// Remove listener on unmount
return function () { return document.removeEventListener("scroll", onScroll); };

@@ -15,0 +21,0 @@ });

2

package.json
{
"name": "react-scroll-to-top",
"author": "Herman Nygaard",
"version": "0.1.2",
"version": "0.1.3",
"main": "lib/ScrollToTop.js",

@@ -6,0 +6,0 @@ "types": "lib/ScrollToTop.d.ts",

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