SeverinDK / moment-timer

Timer plugin for Moment.js that allows creation of setInterval and setTimeout-like timers.
MIT License
110 stars 33 forks source link

ReferenceError: callback is not defined #16

Closed boggdan95 closed 6 years ago

boggdan95 commented 6 years ago

I'm using moment-timer for a server based in node js.

This is how I'm calling the packeges.

var moment = require('moment'); moment().format(); var moment = require('moment-timer');

When I try to run the timer, this error appears.

let timer = new moment.duration(1000).timer(callback); ReferenceError: callback is not defined

SeverinDK commented 6 years ago

Need to see some more code.

SeverinDK commented 6 years ago

Closing this issue. I assume that you haven't defined the callback anywhere. The code example you provide will never work.