Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
console-css
Advanced tools
Print text with CSS in browser
npm i console-css -S
or
yarn add console-css
console.css(options)
options: string | Object | Array<options: Object>
text: string
style?: { [cssKey: string]: string | number }
<options: Object>
import 'console-css';
console.log('This is the console.log().');
console.css('This is the console.css(), you can use console.css like console.log:');
console.css(null);
console.css(undefined);
console.css(true, false);
console.css(1234, 567, 89);
import 'console-css';
console.css({
text: 'Can also be these:',
style: {
fontSize: '18px',
color: '#d4a28e'
}
});
console.css({
text: 'hello world',
style: {
padding: '10px',
lineHeight: '80px',
fontSize: '50px',
textShadow: '2px 2px 1px #999',
background: '#eee',
color: '#eee'
}
});
import 'console-css';
function showStatus(text, val) {
var success = '#00a698';
var error = '#ff7b71';
return [{
text: text,
style: {
padding: '2px 6px',
fontSize: '8px',
color: '#fff',
background: '#555',
borderRadius: '3px 0 0 3px'
}
}, {
text: val ? 'success' : 'error',
style: {
padding: '2px 6px',
fontSize: '8px',
color: '#fff',
background: val ? success : error,
borderRadius: '0 3px 3px 0'
}
}]
}
console.css(showStatus('request', true));
console.css(showStatus('request', false));
FAQs
console.log with css
The npm package console-css receives a total of 2 weekly downloads. As such, console-css popularity was classified as not popular.
We found that console-css 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.