Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@sociably/stream
Advanced tools
Reactive programming stream for handling events in back-end.
⚠ This package is still on early experimental. There might be breaking changes in the future for supporting cluster. You can check the future road map here.
npm install @sociably/stream
# or with yarn
yarn add @sociably/stream
Check the Reactive Programming document and the package reference.
import { makeContainer, IntentRecognizer } from '@sociably/core';
import { fromApp } from '@sociably/stream';
import { map, filter } from '@sociably/stream/operators';
import app from './app';
const event$ = fromApp(app);
const textMsg$ = events$.pipe(
filter(({ event }) => event.type === 'text'),
map(
makeContainer({ deps: [IntentRecognizer] })(
(recognizer) =>
async (context) => {
const { channel, text } = context.event;
const intent = await recognizer.detectText(channel, text);
return { ...context, intent };
}
)
)
);
textMsg$.subscribe(async ({ intent, reply }) => {
const action = intent.type;
if (action) {
await reply(`start ${action}...`);
}
});
FAQs
Reactive programming library for Sociably.js
The npm package @sociably/stream receives a total of 1 weekly downloads. As such, @sociably/stream popularity was classified as not popular.
We found that @sociably/stream 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.