Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

Code golf #24

Closed
zaygraveyard opened this issue Mar 2, 2023 · 4 comments · Fixed by #25
Closed

Code golf #24

zaygraveyard opened this issue Mar 2, 2023 · 4 comments · Fixed by #25

Comments

@zaygraveyard
Copy link

Replacing
https://github.com/weebney/tachyon/blob/a4d6c56f79a889839f5dea68485f1bf34a9b8111/tachyon/tachyon.js#L38-L42
With

 if (whitelistEnabled == onList) { 
   addListenersToElement(); 
 }

Will reduce the minifyed size by a whopping 10 bytes* 😄

* I haven't actually tried it to make sure 😅

@cowtoolz
Copy link
Owner

cowtoolz commented Mar 2, 2023

Can't believe I missed this lol. Good catch.
If you don't mind me asking, how'd you stumble across this project? It's gone from 16 to 46 stars overnight.

cowtoolz pushed a commit that referenced this issue Mar 2, 2023
cowtoolz added a commit that referenced this issue Mar 2, 2023
Refactor forEach to map/filter & fix #24; upgrade to 1.1.0
@nikrowell
Copy link

@weebney not sure where else it appeared, but I came across it in yesterday's Frontend Focus email newsletter
Nice work! 😀
Screen Shot 2023-03-02 at 1 18 56 PM

@cowtoolz
Copy link
Owner

cowtoolz commented Mar 2, 2023

@nikrowell Totally rad. Guess I can finally add an "In the Press" section to my CV

@zaygraveyard
Copy link
Author

If you don't mind me asking, how'd you stumble across this project? It's gone from 16 to 46 stars overnight.

Same as @nikrowell 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants