You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Look at the custom function I suggested in order to get Typer to repeat typing words from an array. While the .forEach portion seems fine, having to first call .line and then .continue seemed a bit verbose. What if we wanted to repeat certain portions of Typer, then repeat others?
In order to simplify things and have a more intuitive API I'm thinking about introducing a repeatStart method that would be used something like this:
typer('.some-class').cursor({block: true}).line()// Portion 1 to repeat 3 times.repeatStart().continue('Hip-Hop').pause(2000).back('all').continue('Truth').pause(2000).back('all').continue('Free Speech').pause(2000).back('all').repeat(3).line()// Portion 2 to repeat 3 times....repeatStart()/* ...methods here... */.repeat(3)
I'm pretty sure that currently it's possible to use repeat in place of repeatStart in the example above and it would work. But that's confusing. Even if repeatStart was a wrapper around repeat, that would improve the API.
The text was updated successfully, but these errors were encountered:
Look at the custom function I suggested in order to get Typer to repeat typing words from an array. While the
.forEach
portion seems fine, having to first call.line
and then.continue
seemed a bit verbose. What if we wanted to repeat certain portions of Typer, then repeat others?In order to simplify things and have a more intuitive API I'm thinking about introducing a
repeatStart
method that would be used something like this:I'm pretty sure that currently it's possible to use
repeat
in place ofrepeatStart
in the example above and it would work. But that's confusing. Even ifrepeatStart
was a wrapper aroundrepeat
, that would improve the API.The text was updated successfully, but these errors were encountered: