Closed arvigeus closed 5 years ago
Right now Filtrex takes .
as a part of the identifier, so this would work:
console.log(myfilter({ 'answer.index': 2 })); // returns "Yes"
In my fork I've implemented an of
operator – you'd use it like so:
const expression = 'index of answer > 1 ? "Yes" : "No"';
const myfilter = filtrex(expression);
// Execute function
console.log(myfilter({ answer: { index: 2 } })); // returns "Yes"
Version 1.0.0 that was published today on the official NPM supports the of
operator, so you can use that. Would you please close this issue, I don't have moderator rights here 😅