Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
☄️ Effector utility library delivering modularity and convenience
import { createEvent } from 'effector';
import { condition } from 'patronum/condition';
const trigger = createEvent<string>();
const longString = createEvent<string>();
const shortString = createEvent<string>();
condition({
source: trigger,
if: (string) => string.length > 8,
then: longString,
else: shortString,
});
import { createEvent } from 'effector';
import { createDebounce } from 'patronum/debounce';
// You should call this event
const trigger = createEvent<number>();
const target = createDebounce(trigger, 200);
target.watch((payload) => console.info('debounced', payload));
trigger(1);
trigger(2);
trigger(3);
trigger(4);
// after 200ms
// => debounced 4
import { createEvent } from 'effector';
import { createThrottle } from 'patronum/throttle';
// You should call this event
const trigger = createEvent<number>();
const target = createThrottle(trigger, 200);
target.watch((payload) => console.info('throttled', payload));
trigger(1);
trigger(2);
trigger(3);
trigger(4);
// 200ms after trigger(1)
// => throttled 1
import { createStore } from 'effector';
import { reshape } from 'patronum/reshape';
const $original = createStore<string>('Hello world');
const parts = reshape($original, {
length: (string) => string.length,
first: (string) => string.split(' ')[0] || '',
second: (string) => string.split(' ')[1] || '',
});
parts.length.watch(console.info); // 11
parts.first.watch(console.log); // "Hello"
parts.second.watch(console.log); // "Second"
import { createEvent, createStore } from 'effector';
import { spread } from 'patronum/spread';
const trigger = createEvent<{ first: string; second: string }>();
const $first = createStore('');
const $second = createStore('');
spread(trigger, {
first: $first,
second: $second,
});
trigger({ first: 'Hello', second: 'World' });
$first.getState(); // "Hello"
$second.getState(); // "World"
import { createEvent } from 'effector';
import { splitMap } from 'patronum/splitmap';
const nameReceived = createEvent<string>();
const received = splitMap(nameReceived, {
firstName: (string) => string.split(' ')[0], // string | undefined
lastName: (string) => string.split(' ')[1], // string | undefined
});
received.firstName.watch((first) => console.info('firstname received', first));
received.lastName.watch((last) => console.info('lastname received', last));
nameReceived('Sergey');
// firstname received "Sergey"
nameReceived('Sergey Sova');
// firstname received "Sergey"
// lastname received "Sova"
FAQs
☄️ Effector utility library delivering modularity and convenience
The npm package patronum receives a total of 14,637 weekly downloads. As such, patronum popularity was classified as popular.
We found that patronum demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.