Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Concolor is a simple library for Node.js for coloring templated strings using tags with annotations
npm install concolor
const concolor = require('concolor');
console.log(concolor`text ${expression}(styles)`);
Examples:
console.log(concolor`Ave ${'World'}(blue) blue`);
console.log(concolor`Ave ${'World'}(/red) on red`);
console.log(concolor`Ave ${'World'}(white/yellow,b) bold white on yellow`);
console.log(concolor`Ave ${'World'}(b) bold`);
console.log(concolor`Ave ${'World'}(b,/blue) bold on blue`);
console.log(concolor`Ave ${'World'}(b,u,yellow) bold underline yellow`);
console.log(concolor`Ave ${'World'}(blue,u) blue underline`);
console.log(concolor`Ave ${'World'}(b,black/green) bold black on green`);
console.log(concolor`
Client on ${'192.168.1.1'}(black/green)
connected to ${'SERVER'}(b,red)
at ${new Date().toUTCString()}(b,blue)
`);
const tag = concolor(styles);
console.log(tag`text`);
Examples:
const warn = concolor('b,yellow');
const err = concolor('b,yellow/red');
const inf = concolor('i,white');
console.log(warn`test1 ${'text2'} text3`);
console.log(err`test4 ${'text5'} text6`);
console.log(inf`test7 ${'text8'} text9`);
const style = concolor(styles);
console.log(style('text'));
Examples:
const warn = concolor('b,yellow');
const err = concolor('b,yellow/red');
const inf = concolor('i,white');
console.log(warn(`test1 ${'text2'} text3`));
console.log(err(`test4 ${'text5'} text6`));
console.log(inf(`test7 ${'text8'} text9`));
const theme = concolor({
caption: 'b,white',
text: 'green',
link: 'u,yellow',
});
const caption = 'Caption';
const text = 'Here is a text';
const link = 'http://metarhia.com';
console.log(theme` ${{ caption }}
${{ text }}
${{ link }}`);
const theme = concolor({
caption: 'b,white',
text: 'green',
link: 'u,yellow',
});
console.log(theme.caption('Caption example'));
Copyright (c) 2017-2023 Metarhia contributors.
Concolor is MIT licensed.
Concolor is a part of Metarhia technology stack.
[1.0.6][] - 2023-04-29
FAQs
Console colors for strings templates in node.js
The npm package concolor receives a total of 45 weekly downloads. As such, concolor popularity was classified as not popular.
We found that concolor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.