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 7 days ago | hide | past | web | favorite | 2 comments
https://typescript-spritz.stackblitz.io

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))

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



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

Search: