Hi,
Could you please help me?
how can I import exported function, and run code for all ui helpers?
import '/imports/ui/UIHelpers';
executes this code
export function formatDatetime(date){
return moment(date).format('MMMM Do YYYY, h:mm:ss a');
};
Template.registerHelper('formatDateTime', function(date) {
return formatDatetime(date);
});
But now I need to import the formatDatetime also somewhere to be used a function? Do I need to make 2 import statements?
import '/imports/ui/UIHelpers';
import {formatDateTime} from '/imports/ui/UIHelpers';
thanks