New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

tiny-pulsar

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tiny-pulsar

Minimal footprint library that triggers a callback when the user scrolls or resizes the browser.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Tiny Pulsar

Build Status Dependency Status devDependency Status

Minimal footprint library that triggers a callback when the user scrolls or resizes the browser.

Get Started

npm install tiny-pulsar

API

register(namespace, callback)

Register a callback to be fired. Registration is accumulative and namespace is not unique.

  • namespace: Callback namespace. (String)
  • callback: Function to be fired. (Function)

deregister(namespace)

Deregister all callbacks registered with the same namespace.

  • namespace: Callback namespace. (String)

Usage

import { register, deregister } from 'tiny-pulsar'

register('this is a namespace', function () {
  // → your code goes here
  deregister('this is a namespace')
})

License

See the License file.

Keywords

scroll

FAQs

Package last updated on 03 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts