scroll-lines
v0.1.7
Published
Show lines of text scrolling on terminal like an electronic stock ticker tape
Downloads
3
Readme
Table of Contents
Introduction
Show information on console without using a lot of real estate screen by letting it scroll horizontally like those electronic stock ticker tape
How to use it
Install the package
$ npm i --save scroll-lines
Pass an array of strings and the speed in miliseconds to the scroll function
const { scroll } = require('scroll-lines')
const text = [
'Lorem ipsum dolor sit amet...',
'Idioms are a wonderful part of the English...'
]
scroll(text, 100)
The result will be shown on the console
scroll
Print multiple automatic horizontal scroll text to terminal
Parameters
textArr
string Each item is a line that will scroll repeatedlyspeed
number The speed in ms for the animation (optional, default100
)
Examples
scroll(['a large text'], ['another large text'])
Returns void