José Quiñones Flores 4564da0130 Added Laravel project and removed sensitive data | 4 роки тому | |
---|---|---|
.. | ||
test | 4 роки тому | |
.npmignore | 4 роки тому | |
.testem.json | 4 роки тому | |
.travis.yml | 4 роки тому | |
LICENCE | 4 роки тому | |
README.md | 4 роки тому | |
index.js | 4 роки тому | |
package.json | 4 роки тому | |
seed.js | 4 роки тому |
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