
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.
@coffeekraken/s-stdio
Advanced tools
{{#> layout-readme }}
This package allows you to display processes/webpages logs with ease. Here's some of the features available:
SBasicStdio
: Nice IO interface for terminaltype
Here's how to use our implementation:
import __SStdio from '@coffeekraken/s-stdio';
import spawn from '@coffeekraken/sugar/node/process/spawn';
const proc = spawn('ls -la');
__SStdio.new(__SStdio.UI_BASIC, proc);
The SStdio
class will listen for some events log
and ask
. Once one of these events is triggered, the IO will either display a log, or the asked question using different implementations depending on the SStdio
instanciated type.
The event are listened using the SEventEmitter class.
Here's an example of emitting a log event that will be handled by the SStdio
instance:
import __SPromise from '@coffeekraken/s-promise';
import __SLog from '@coffeekraken/s-log';
export default function myProcess() {
return new __SPromise(({ resolve, reject, emit }) => {
// do something...
emit('log', {
type: __SLog.TYPE_INFO,
value: 'Hello world from my cool process',
});
// do something...
resolve();
});
}
Note that the
SPromise
class extends theSEventEmitter
one.
{{> interface namespace='@coffeekraken.s-stdio.shared.interface.SStdioSettingsInterface' }}
For more information about the API of this class, please check our API documentation
{{/ layout-readme }}
FAQs
Clean and extensible Stdio system that make use of the @coffeekraken/s-event-emitter event system to listen to "log" or "ask" events and display them nicely with our built-in terminal implementation or anywhere else if you extends it.
We found that @coffeekraken/s-stdio 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.