
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
A tiny stream log
$ npm install --save squeak
var Squeak = require('squeak');
var log = new Squeak()
.type('info')
.type('success', {color: 'green'})
.type('warn', {color: 'yellow'})
.type('error', {color: 'red'}, function () {
log.end();
process.exit(1);
});
log.info('this is a info message');
log.success('this is a success message');
log.warn('this is a warning');
log.error(new Error('this is an error').stack);
/*
info : this is a info message
success : this is a success message
warn : this is a warning
error : this is an error
at ChildProcess.exithandler (child_process.js:648:15)
at ChildProcess.emit (events.js:98:17)
*/
You can also customize the different types to use a custom prefix using the
prefix
option:
var Squeak = require('squeak');
var log = new Squeak({separator: ' '})
.type('success', {color: 'green', prefix: '✔'})
.type('warn', {color: 'yellow', prefix: '⚠'});
log.success('this is a success message');
log.warn('this is a warning');
/*
✔ this is a success message
⚠ this is a warning
*/
Creates a new Squeak
instance.
Type: boolean
Default: true
Whether to align the prefixes or not. E.g:
foo : hello
foobar : world
Type: number
Default: 2
Sets the indentation.
Type: string
Default: :
Customize the separator between the prefix
and the message.
Type: stream
Default: process.stderr
Which stream
to write to.
Type: string
Writes to options.stream
, using process.stderr
by default.
Type: string
Same as .write()
but with a new line.
Type: string
Same as .write()
but with padding.
Adds a type.
Type: string
The name of the type. Will be used as prefix
by default.
Type: string
Sets the prefix color. Supported colors can be found here.
Type: string
Sets the type
prefix. Uses type
by default.
Type: function
An optional callback to be called when the type
is called.
Emits an event.
Type: function
Writes a newline and executes an optional callback function.
MIT © Kevin Mårtensson
FAQs
A tiny stream log
The npm package squeak receives a total of 374,550 weekly downloads. As such, squeak popularity was classified as popular.
We found that squeak 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.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.