Open masbicudo opened 9 years ago
I'm sorry I didn't remember that. I didn't mean to reimplement that.
Is your version any better than the one I submitted with the unit tests? The only difference I'm seeing is that yours support an evaluator
function to be returned. Mine just evaluates it.
If your version is any better we can update the codebase.
There are some differences:
Console
)... I don't have tests for it right nowIt is saved in my repo, so we can choose to use it or not at any moment, if you think it is not the right time.
Yes, I think we should come back to this once it's proven to be a problem. If we stick to every nitty gritty details we won't go any further. I'm currently focused on converting a sample component to CJS and create a build process for ReactComponents.
Some time ago, we talked about text expressions... and I have implemented it generating a function that was able to be called passing an object. Since that comment, I have evolved it a little.
Example 1:
createEvaluator
does not depend on an existing instance of the object to create the evaluator function:Example 2: it allows you to use variable names in the code, without requiring them to be set on the source object:
I haven't tested it widely though... but it works in current versions of FF and Chrome.
Take a look at tell me what you do think.
The code: