-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timer intervals revised #14
Conversation
gazj
commented
Feb 24, 2018
- Added function to replace text with "scifi" text
- Added 'keepChars' array option to prevent replacing certain characters
- Invervals are now responsible for clearing themselves
- Expose interval continues until reaching end of content string
- Scifi interval continues until display text matches original content
- Config values renamed to 'scifiSpeed' and 'exposeDelay' for clarity
- Support added for using a scifiSpeed higher than exposeDelay value
- Added function to replace text with "scifi" text - Added 'keepChars' array option to prevent replacing certain characters - Invervals are now responsible for clearing themselves - Expose interval continues until reaching end of content string - Scifi interval continues until display text matches original content - Config values renamed to 'scifiSpeed' and 'exposeDelay' for clarity - Support added for using a scifiSpeed higher than exposeDelay value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, can you update the docs as well?
src/getRandomChar.js
Outdated
function toScifiText(chars, text, keepChars) { | ||
let retChars = '' | ||
for (let i = 0; i < text.length; i++) { | ||
retChars += keepChars.includes(text[i]) ? text[i] : getRandomChar(chars) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe use .indexOf
for IE compatibility 😄
I've switched to using |