![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
scrollable-cli
Advanced tools
Create independent scrollable areas with ANSI support in the terminal.
npm install scrollable-cli
Create a scrollable area with content and print it:
import Scrollable from 'scrollable-cli';
const box = Scrollable({
content:
"Lorem ipsum is boring but I couldn't think " +
"of anything else, so here's a yellow cat:" +
chalk.yellow(`
|\\---/|
| o_o |
`),
start: { x: 10, y: 3 },
size: { width: 22, height: 4 },
wrapOptions: { trim: false, hard: false, wordWrap: true }
})
.print();
Or use the fluent API:
const box = Scrollable()
.setContent("...")
.setStart({ x: 10, y: 3 })
.setSize({ width: 22, height: 4 })
.setWrapOptions({ trim: false, hard: false, wordWrap: true })
.print();
Scroll the content up and down:
box.scroll(1).print(); // Down
box.scroll(-1).print(); //Up
This package doesn't handle keypress events to make it easier for you to integrate it with your own keypress event handler:
const box = Scrollable(/* ... */);
emitKeypressEvents(process.stdin);
process.stdin.setRawMode(true);
process.stdin.on('keypress', (str, key) => {
switch (key.name) {
case 'up':
box.scroll(-1).print();
break;
case 'down':
box.scroll(1).print();
break;
}
});
git clone https://github.com/pawap90/scrollable-cli.git
npm install
npm run example --file=<example-file-name>
## Or for windows:
npm run example:win --file=<example-file-name>
## E.g:
npm run example --file=1-simple-box
npm run example:win --file=1-simple-box
Example file | Description |
---|---|
1-simple-box | Prints a simple "lorem ipsum" box that scrolls automatically up and down. |
2-keypress-events | Prints 3 independent boxes that can be scrolled up and down with the arrow keys. |
npm test
FAQs
Create independent scrollable areas in the terminal.
The npm package scrollable-cli receives a total of 1 weekly downloads. As such, scrollable-cli popularity was classified as not popular.
We found that scrollable-cli demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.