-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Added universal expressions (short form functions): $ex #232
Conversation
What do you think about this?
I think that it's good to keep $fn not only to avoid further breaking changes, but also because it explains $f in a sense. @FrnchFrgg @zanna-37 you've both been very critical and constructive, I'd really appreciate your opinions&thoughts on this |
a887b13
to
6cba41c
Compare
I used this a bit today and it is quite convenient, but I'll rename it to |
Indeed, something like |
if (typeof value === "string" && value.startsWith("$fn")) { | ||
value = myEval(value.slice(3)); | ||
if (typeof value === "string") { | ||
if (typeof value === "string" && value.startsWith("$ex")) { |
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.
Why do you check again for the type of 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.
To be extra sure?
Thanks, I fixed that now.
I went with $ex partly to keep it short, but mostly because $fn also had 2 letters. I've been using it and it is quite convenient :) |
$fn ({getFromConfig, xs, ...etc...}) => getFromConfig("title")
equivalent to
$f get("title")
(all other params also available)