Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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 5 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.