
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.
console-goodies
Advanced tools
Console goodies for debugging. :bug: :hammer:
yarn add console-goodies
.
import 'console-goodies';
/* or */
require('console-goodies');
/**
* console.group|time|profile call automatically their console.whateverEnd
* counterpart when the function finishes.
*
*/
console.group('group therapy', () => {
console.log('foo');
console.log('bar');
console.log('lol');
});
/**
* LOG:
*
* group-therapy/
* âââ bar
* âââ foo
* âââ lol
*/
console.time(() => {
verySlowSyncFunction();
});
// LOG: 42000.1337ms ellapsed
/**
* You can specify a label too
*/
console.time('this is soooo slow', () => {
verySlowFunction();
});
// LOG: "this is so slow" 42000.1337ms ellapsed
/**
* And they also work with async stuff! Promises or promise-returning functions
* call their console.whateverEnd counterpart when the promise is fulfiled.
*/
console.time(() => {
return new Promise((resolve) => setTimeout(resolve, 1000))
});
// LOG: 999.00000000002ms ellapsed
console.time('passing a promise directly', verySlowAsyncFunction());
// LOG: "passing a promise direcly" 300.00ms ellapsed
/**
* console.tap
*
* logs and returns a value: handy for peeking into stuff
* without having to create an intermediate variable just
* for debugging purposes.
*/
const f = () => 'f'
const u = () => 'u'
const c = () => 'c'
const k = () => 'k'
const fuck = () => f(u(console.tap(c(k))))
fuck();
// LOG: 'c'
/**
* console.wtf
*
* Because this is what we all do, most of the time.
*/
console.wtf();
// LOG: 'wtf'
FAQs
console goodies
The npm package console-goodies receives a total of 1 weekly downloads. As such, console-goodies popularity was classified as not popular.
We found that console-goodies 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.