
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
@nopecha/pprint
Advanced tools
This package provides pretty-print logging functions for Node.js.
npm install @nopecha/pprint
Add to the top of the entry file of the project.
import '@nopecha/pprint'
The above will expose the pretty-print logging functions to the global scope.
Replace console with global to color-code terminal outputs in Node.js.
Available are trace, debug, info, log, warn, and error.
global.trace() // Red
global.debug('this is green')
global.info('this is cyan')
global.warn('this is yellow')
global.error('this is red')
global.log('this does not have a color yet')
Add color to log messages. Color codes are prefixed with ! in their own string.
global.log('!r', 'this is red')
global.log('!g', 'this is green')
global.log('!b', 'this is blue')
Add background colors with a second color code.
global.log('!rb', 'this is red on blue')
Add text styles with a third color code.
global.log('!uwd', 'underlined') // underlined, white on dark
global.log('!bdw', 'bolded') // bolded, dark on white
global.log('!igw', 'italicized') // italicized, green on white
Multiple colors can be used in a single log statement.
Note that all color code strings including "!" are zero width, except "! " where a color-stop code can contain a space that is left untrimmed.
global.log('!r', 'this is red', '!', ' this is normal ', '!b', 'blue', '! ', 'normal')
© 2024 NopeCHA, LLC
FAQs
A pretty-print utility for Node.js
The npm package @nopecha/pprint receives a total of 4 weekly downloads. As such, @nopecha/pprint popularity was classified as not popular.
We found that @nopecha/pprint 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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.