Skip to content
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

[FEATURE] better usage example in readme #70

Open
GottZ opened this issue Aug 30, 2023 · 1 comment
Open

[FEATURE] better usage example in readme #70

GottZ opened this issue Aug 30, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@GottZ
Copy link

GottZ commented Aug 30, 2023

You have a screen capture of a live transformation in the readme, that could be perfectly vanilla javascript with:

console.log(["a", "b"].includes(searchItem))

as someone knowing their languages, I usually advice against purely esoteric usage examples like this.

could someone come up with a better example for the readme?

@GoogleFeud
Copy link
Owner

Theoretically, anything macros expand to can be written in javascript. I like the example because it shows how something trivial that's usually a pain to write if you have a ton of items to compare to, can be made simpler to understand while maintaining the exact same look in the javascript output. And the generated code is different than the one you've provided because it doesn't create an array in place and it doesn't go through every element of it.

I'm open to suggestions if anyone has a better example, though!

@GoogleFeud GoogleFeud added the documentation Improvements or additions to documentation label Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants