![New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions](https://cdn.sanity.io/images/cgdhsj6q/production/86e6ebdea652d20da070ebbda20134b839972db7-1024x1024.webp?w=800&fit=max&auto=format)
Security News
New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
console-stamp
Advanced tools
Readme
Patch Node.js console methods in order to add timestamp information by pattern.
npm install console-stamp
// Patch console.x methods in order to add timestamp information
require("console-stamp")(console, "HH:mm:ss.l");
console.log("Hello World!");
// -> 14:02:48.062 Hello World!
var port = 8080;
console.log("Server running at port %d", port);
// -> 16:02:35.325 Server running at port 8080
console.time( "MyTimer" );
console.log( "LOG" );
console.info( "INFO" );
console.warn( "WARN" );
console.error( "ERROR" );
console.dir( { foo: "bar" } );
console.trace();
console.timeEnd( "MyTimer" );
console.assert( count < 10, "Count is > 10" );
Result:
20:01:27.500 LOG
20:01:27.504 INFO
20:01:27.504 WARN
20:01:27.504 ERROR
20:01:27.504 { bar: 'console.dir' }
20:01:27.508 Trace
at Object.<anonymous> (/Users/starak/code/node-console-stamp/test.js:14:9)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
20:01:27.510 MyTimer: 10ms
20:01:27.510
AssertionError: Count is > 10
at Console.assert (console.js:102:23)
at Console.con.(anonymous function) [as assert] (/Users/starak/code/node-console-stamp/main.js:35:24)
at Object.<anonymous> (/Users/starak/code/node-console-stamp/test.js:16:9)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
See more about timestamp patterns at felixges excellent dateformat
FAQs
Patch NodeJS console methods in order to add timestamp information by pattern
The npm package console-stamp receives a total of 173,739 weekly downloads. As such, console-stamp popularity was classified as popular.
We found that console-stamp demonstrated a healthy version release cadence and project activity because the last version was released less than 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
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
Security News
Results from the 2023 State of JavaScript Survey highlight key trends, including Vite's dominance, rising TypeScript adoption, and the enduring popularity of React. Discover more insights on developer preferences and technology usage.
Security News
The US Justice Department has penalized two consulting firms $11.3 million for failing to meet cybersecurity requirements on federally funded projects, emphasizing strict enforcement to protect sensitive government data.