
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
callbag-from-obs
Advanced tools
/**
npm install callbag-from-obsconst Rx = require('rxjs');
const fromObs = require('callbag-from-obs');
const observe = require('callbag-observe');
const source = fromObs(Rx.Observable.interval(1000).take(4));
observe(x => console.log(x)(source); // 0
// 1
// 2
// 3
.subscribe method:const fromObs = require('callbag-from-obs');
const observe = require('callbag-observe');
const subscribable = {
subscribe: (observer) => {
let i = 0;
setInterval(() => observer.next(i++), 1000);
}
};
const source = fromObs(subscribable);
observe(x => console.log(x))(source); // 0
// 1
// 2
// 3
// ...
*/
const $$observable = require('symbol-observable').default;
const fromObs = observable => (start, sink) => { if (start !== 0) return; let dispose; sink(0, t => { if (t === 2 && dispose) { if (dispose.unsubscribe) dispose.unsubscribe(); else dispose(); } }); observable = observable[$$observable] ? observable$$observable : observable; dispose = observable.subscribe({ next: x => sink(1, x), error: e => sink(2, e), complete: () => sink(2) }); };
module.exports = fromObs;
FAQs
Convert an observable to a callbag listenable source
The npm package callbag-from-obs receives a total of 1,009 weekly downloads. As such, callbag-from-obs popularity was classified as popular.
We found that callbag-from-obs 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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.