0.0.1 • Published 9 years ago
simple-typewriter v0.0.1
simple-typewriter
installation
npm install --save simple-typewriterusage
const element = document.querySelector('.some-element')
const interval = 100
const stopTypewriter = simpleTypewriter('test', element, { interval: interval })
// you can stop the typewriter if you need
stopTypewriter()documentation
simpleTypewriter(text, element, options)
| argument | required | type | description |
|---|---|---|---|
| text | true | String | The text the typewriter will type out |
| element | true | Element | The element on which to write the text |
| options | false | Object | See options section |
#### options
Supported parameters are:
| argument | required | type | description |
|---|---|---|---|
| interval | true | String | The interval at which each letter is typed |
| nextText | false | Object | nextText options |
development
Install dependencies:
npm iRun tests:
npm t
# or
npm t -- --watch0.0.1
9 years ago