Fuse 1.5
Not quite sure if bug or intended behaviour, my .where
returns null all the time unless I add it in module.exports.
<App>
<JavaScript>
var Observable = require('FuseJS/Observable');
var fruits = Observable(
{ name: "Apple" , color: "red" },
{ name: "Lemon" , color: "yellow" },
{ name: "Pear" , color: "green" },
{ name: "Banana", color: "yellow" });
var goodFruits = fruits.where({color: "yellow"});
function search(){
console.log(JSON.stringify(goodFruits.value))
}
module.exports = {search}
</JavaScript>
<StackPanel>
<Button Text="Search" Clicked="{search}" />
</StackPanel>
</App>
You will get null; add goodFruits
in module.exports
to get {"name":"Lemon","color":"yellow"}