Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Spritz clone in 33 lines of TypeScript. Long words are displayed longer
4 points by raymond_goo on Apr 14, 2019 | hide | past | web | favorite | 4 comments

License is Public Domain/CC0 and the code is here: https://stackblitz.com/edit/typescript-spritz

PS: This is a really quick hack because my Spritzlet license ran out and I hated that Spritz doesn't show long words longer than short words for a long time.

Spritz Homepage for reference: https://www.spritz.com/

This is awesome.

I know it's just a quick hack, but I'm curious about this in the code:

  200 +(30*word.length - 7)
I've never used TypeScript, but I'm assuming this is the same as:

  (200 - 7) +(30*word.length)
But I guess you meant:

  200 +(30*(word.length - 7))

Thanks! I fixed it. (And added slider)

Error in /~/index.ts (19:21) Cannot read property 'replace' of undefined

Can you please report the exact browser version and platform you are using ? I will try to fix it.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact