Initial commit

This commit is contained in:
Luis Fernando Molina committed 2018-02-07 21:05:26 +01:00
commit ec49fedc45
1288 files changed
+226749

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
module.exports = function(length) {
var last = null
, repeat = 0
if (typeof length == 'undefined') length = 15
return function() {
var now = Math.pow(10, 2) * +new Date()
if (now == last) {
repeat++
} else {
repeat = 0
last = now
}
var s = (now + repeat).toString()
return +s.substr(s.length - length)
}
}