0.0.1 • Published 7 years ago

simple-typewriter v0.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

simple-typewriter

installation

npm install --save simple-typewriter

usage

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)

argumentrequiredtypedescription
texttrueStringThe text the typewriter will type out
elementtrueElementThe element on which to write the text
optionsfalseObjectSee options section

#### options

Supported parameters are:

argumentrequiredtypedescription
intervaltrueStringThe interval at which each letter is typed
nextTextfalseObjectnextText options

development

Install dependencies:

npm i

Run tests:

npm t
# or
npm t -- --watch