
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
bar-provider
Advanced tools
This module provides a way to easily define data to be piped into LemonBoy's bar. It depends on generators, so run node with the --harmony flag (or use io.js).
bar.js
var Bar = require('bar-provider');
var bar = new Bar();
bar
.button('dmenu_run', 'Menu')
.center(function *() {
return new Date();
})
.interval(1000);
Now you can pipe it to bar
$ node --harmony bar.js | bar
This module provides a chainable api to allow easy construction of a bar layout. Whenever any data should be provided to a method, you may pass a string or a generator function returning a string. Any generator function will be run through co and its return value will be rendered.
Simply append raw text
Prefixes with %{l}
Prefixes with %{r}
Prefixes with %{c}
Prefixes with %{F<color>} and postfixes with %{F}
Prefixes with %{B<color>} and postfixes with %{B}
Prefixes %{A:<cmd>:} and postfixes with %{A}
You may chain all the provided methods. If you omit the data argument, all the chained styles apply at once. So the following will give you blue background AND white text:
bar.bg('blue').color('white', 'Some Data');
while the following will print text on blue background followed by white text:
bar.bg('blue', 'Some Data').color('white', 'Some more Data')
Generator function which, when run through co outputs a single line on the console.
bar.render() wrapped via co. This returns immediately.
Normal function, which calls the render function at each interval.
To allow styling of data returned from generator functions (think color for battery percentage), each generator function is passed a utility object, containing all the above methods. Simply return the result of a yielded method if neccessary. These may be chained as well
function *getBattery(utils) {
//somehow get your battery percentage
var percent = yield getPercentage();
var color = percent > 50 ? 'green' : 'red';
return yield utils.color(color, percent);
}
bar.right(getBattery);
FAQs
Easy configuration for LemonBoy's bar
We found that bar-provider 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.