![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
window-resize-subject
Advanced tools
[![npm version](https://badge.fury.io/js/window-resize-subject.svg)](https://badge.fury.io/js/window-resize-subject) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) ![CI](https://github.com/mya-ak
Handler for the window resize event of the observer pattern.
npm
$ npm i window-resize-subject
yarn
$ yarn add window-resize-subject
import { WindowResizeSubject } from 'window-resize-subject';
// create subject
const subject = new WindowResizeSubject();
// add observer
const observer = ({ width, height }) => {
// do something
};
subejct.addObserver('name', observer);
// start watching the resize event
subject.subscribe();
note: You can also write in a method chain
subejct.addObserver('name', observer).subscribe();
string
WindowResizeObserver
(event: { width: number, height: number }) => void
Add observer.
subejct.addObserver('name', ({ width, height }) => {
// do something
});
Start watching the resize event.
Stop watching the resize event.
note: observer is not deleted.
Object
number
number
Force update.
subject.notifyObservers({ width: 800, height: 600 });
string
Deletes the specified Observer.
subject.deleteObserver('name');
Deletes all Observers.
number
Changes the delay time for a resize event.
subject.setDelay(100);
delay
(option)number
50
Changes the delay time for a resize event.
import { WindowResizeSubject } from 'window-resize-subject';
const subject = new WindowResizeSubject({ delay: 100 });
If you find a bug or want to contribute to the code or documentation, you can help by submitting an issue or a pull request.
FAQs
[![npm version](https://badge.fury.io/js/window-resize-subject.svg)](https://badge.fury.io/js/window-resize-subject) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) ![CI](https://github.com/mya-ak
The npm package window-resize-subject receives a total of 1,849 weekly downloads. As such, window-resize-subject popularity was classified as popular.
We found that window-resize-subject demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.