Eric Foster d5378345de connection between front end and database | vor 6 Jahren | |
---|---|---|
.. | ||
test | vor 6 Jahren | |
.npmignore | vor 6 Jahren | |
.testem.json | vor 6 Jahren | |
.travis.yml | vor 6 Jahren | |
LICENCE | vor 6 Jahren | |
README.md | vor 6 Jahren | |
index.js | vor 6 Jahren | |
package.json | vor 6 Jahren | |
seed.js | vor 6 Jahren |
A requirable version of Date.now()
Use-case is to be able to mock out Date.now() using require interception.
var now = require("date-now")
var ts = now()
var ts2 = Date.now()
assert.equal(ts, ts2)
var now = require("date-now/seed")(timeStampFromServer)
// ts is in "sync" with the seed value from the server
// useful if your users have their local time being a few minutes
// out of your server time.
var ts = now()
npm install date-now