![Malicious npm Package Typosquats react-login-page to Deploy Keylogger](https://cdn.sanity.io/images/cgdhsj6q/production/007b21d9cf9e03ae0bb3f577d1bd59b9d715645a-1024x1024.webp?w=400&fit=max&auto=format)
Research
Security News
Malicious npm Package Typosquats react-login-page to Deploy Keylogger
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
@types/tapable
Advanced tools
Package description
The @types/tapable package provides TypeScript type definitions for the Tapable library, which is used primarily in webpack for its plugin architecture. Tapable allows you to add and apply plugins to a JavaScript project. It offers various hooks like SyncHook, AsyncParallelHook, and more, which can be used to handle synchronous and asynchronous operations.
SyncHook
SyncHook allows for the synchronous execution of functions. The functions attached via `tap` will be executed in the order they were added when `call` is invoked.
import { SyncHook } from 'tapable';
const hook = new SyncHook(['arg1']);
hook.tap('PluginName', (arg1) => {
console.log(`Value received: ${arg1}`);
});
hook.call('test');
AsyncParallelHook
AsyncParallelHook allows for the parallel execution of asynchronous functions. Functions can be added using `tapPromise` and are executed with `promise`.
import { AsyncParallelHook } from 'tapable';
const asyncHook = new AsyncParallelHook(['arg1']);
asyncHook.tapPromise('PluginName', (arg1) => {
return new Promise((resolve, reject) => {
setTimeout(() => {
console.log(`Async value: ${arg1}`);
resolve();
}, 1000);
});
});
asyncHook.promise('test').then(() => {
console.log('All async plugins have finished');
});
Mitt is a tiny functional event emitter / pubsub library. It offers similar event handling capabilities but lacks the sophisticated hook system and the distinction between synchronous and asynchronous operations found in Tapable.
EventEmitter3 is a high-performance event emitter. While it provides efficient event handling like Tapable, it does not support the hook-based plugin architecture that allows for ordered execution and lifecycle management in Tapable.
Readme
npm install --save @types/tapable
This package contains type definitions for tapable (https://github.com/webpack/tapable.git).
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tapable
Additional Details
These definitions were written by e-cloud https://github.com/e-cloud.
FAQs
Unknown package
We found that @types/tapable demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
Security News
The JavaScript community has launched the e18e initiative to improve ecosystem performance by cleaning up dependency trees, speeding up critical parts of the ecosystem, and documenting lighter alternatives to established tools.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.