
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
progress-str
Advanced tools
Create a string based progress bar.
import { progressBar } from 'progress-str'
const bar = progressBar()
bar.render(0.5) // [-----------|-----------] 50%
// Also support multiple values
bar.render(0.25, 0.5, 1) // [---|--|-----|] 25% 50% 100%
// If the value is unknown/not available, pass in undefined:
bar.render(0.5, undefined) // [---------|----------] 0.5 ---
progressBar({
bar: {
completedMarker: '-', // marker for completed section of the bar
incompleteMarker: '-', // marker for incomplete section of the bar
leftBracketMarker: '[',
rightBracketMarker: ']',
},
length: 30, // total length of the result, including the text
textAlign: 'left', // align text relative to max possible text length of each entry.
textPosition: 'right', // 'left' | 'right' | 'none'
value: {
digits: 1, // number of fraction digits. 0 | 1 | 2.
// It defaults to different values depending on the max value.
max: 1, // Value that means 100%.
// It can be set to undefined, to indicate that value is not available.
// But the render value must also be undefined.
// If not it will throws MissingMaxValue.
marker: '|', // marker for the value
textStyle: 'percentage', // 'percentage' | 'number' | 'ratio'
textTransform(text: string): string, // transform the styled string, can use this to color the text
}
})
// To style multiple values differently.
progressBar({
...,
value: [{ ... }, { ... }, ...],
})
FAQs
Create a progress string
We found that progress-str 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.