
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@solid-primitives/debounce
Advanced tools
Creates a helpful debounce function.
npm install @solid-primitives/debounce
# or
yarn add @solid-primitives/debounce
const fn = createDebounce((message: string) => console.log(message), 250));
fn('Hello!');
fn.clear() // clears a timeout in progress
function createDebounce<Args extends any[]>(
func: (...args: Args) => void,
wait?: number
): DebouncedFunction<Args>;
interface DebouncedFunction<Args extends any[]> {
(...args: Args): void;
clear: () => void;
}
You may view a working example here: https://codesandbox.io/s/solid-primitives-debounce-ng9bs?file=/src/index.tsx
1.0.0
Initial commit and publish of debounce primitive.
1.0.1
Improved types, minor clean-up and added tests.
1.0.2
Changed any to unknown type and applied patch from high1.
1.0.5
Adding CJS support to package.
1.0.8
Cleaned up documentation
1.1.0
Updated to Solid 1.3
1.1.2
Added missing automated clean-up.
1.2.0
Improved types, changed output format from [fn, clear]
to fn & { clear }
FAQs
Primitive that creates a debounce function
The npm package @solid-primitives/debounce receives a total of 310 weekly downloads. As such, @solid-primitives/debounce popularity was classified as not popular.
We found that @solid-primitives/debounce demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.