
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@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 { serviceContainer, 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(
serviceContainer({ deps: [IntentRecognizer] })(
(recognizer) =>
async (context) => {
const { thread, text } = context.event;
const intent = await recognizer.detectText(thread, 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 2 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.