Has anyone created a commonjs wrapper for Date.js?
I’d like to use the Date.js library inside node and don’t want to import it as a bare file and eval it if I can help it.
Has anyone created a commonjs wrapper for Date.js? I’d like to use the Date.js
Share
What do you mean by a ‘commonjs wrapper’? This code worked fine for me:
Date is a global object, and when you do the require, date.js modifies the global object. It didn’t seem to mess up the regular date stuff. I would personally want to refactor it, because modifying the global object seems a little scary to me.