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

animated-scroll-to

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

animated-scroll-to - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

8

lib/animated-scroll-to.d.ts
declare type TCoords = [number | null, number | null];
interface IUserOptions {
interface IOptions {
cancelOnUserAction?: boolean;

@@ -13,5 +13,5 @@ easing?: (t: number) => number;

}
declare function animateScrollTo(y: number, userOptions?: IUserOptions): any;
declare function animateScrollTo(coords: TCoords, userOptions?: IUserOptions): any;
declare function animateScrollTo(scrollToElement: Element, userOptions?: IUserOptions): any;
declare function animateScrollTo(y: number, userOptions?: IOptions): any;
declare function animateScrollTo(coords: TCoords, userOptions?: IOptions): any;
declare function animateScrollTo(scrollToElement: Element, userOptions?: IOptions): any;
export default animateScrollTo;
{
"name": "animated-scroll-to",
"version": "2.0.3",
"version": "2.0.4",
"description": "Simple, plain JavaScript animated window scroll",

@@ -5,0 +5,0 @@ "main": "./lib/animated-scroll-to.js",

type TCoords = [number | null, number | null];
interface IUserOptions {
interface IOptions {
cancelOnUserAction?: boolean

@@ -15,13 +15,2 @@ easing?: (t:number) => number

interface IOptions {
cancelOnUserAction: boolean
easing: (t:number) => number
elementToScroll: Element | Window
horizontalOffset: number
maxDuration: number
minDuration: number
speed: number
verticalOffset: number
}
// --------- SCROLL INTERFACES

@@ -148,8 +137,8 @@

function animateScrollTo(y:number, userOptions?:IUserOptions);
function animateScrollTo(coords:TCoords, userOptions?:IUserOptions);
function animateScrollTo(scrollToElement: Element, userOptions?:IUserOptions);
function animateScrollTo(y:number, userOptions?:IOptions);
function animateScrollTo(coords:TCoords, userOptions?:IOptions);
function animateScrollTo(scrollToElement: Element, userOptions?:IOptions);
function animateScrollTo(
numberOrCoordsOrElement: number | TCoords | Element,
userOptions: IUserOptions = {}
userOptions: IOptions = {}
) {

@@ -156,0 +145,0 @@ // Check for server rendering

@@ -12,6 +12,2 @@ {

},
// "lib": [
// "ES2015",
// "dom"
// ],
"include": [

@@ -18,0 +14,0 @@ "src/**/*"

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