consoledotonly
v0.0.2
Published
console.only() ignores all other console logs and logs this one only
Downloads
4
Readme
console.only()
console.only()
ignores all other console logs and logs this one only. Inspired by this Tweet. This package works both in the browser and in standalone JavaScript runtimes (e.g. Node.js, Deno, Bun, etc.).
npm: consoledotonly GitHub: BenjaminAster/console.only
import "consoledotonly";
console.log("test");
console.log("test2");
console.only("only this!")
console.log("test3");
console.only("and this!");
console.log("test4");
// prints "only this!" and "and this!" to the console
Q&A
Q: Is this satire? A: Yes.
Q: Does this actually work? A: Also yes.