Hi guys,
what is best practise to implement a function with named parameters in meteor in combination with using check
?
According to es6 docs this is possible to do:
function drawES6Chart({size = 'big', cords = { x: 0, y: 0 }, radius = 25} = {})
{
// DOES THE CHECK() FUNCTION WORK?
// WHAT is best practise to do this?
check(size, String);
console.log(size, cords, radius);
}
drawES6Chart({
cords: { x: 18, y: 30 },
radius: 30
});
So the question is: does check() work and is this best practise?