Logo
Explore Help
Register Sign In
iLoveElysia/pjax
1
0
Fork 0
You've already forked pjax
Code Issues Pull Requests Actions Packages Projects Releases 9 Wiki Activity
Files
0.2.1
pjax/lib/uniqueid.js

9 lines
171 B
JavaScript
Raw Permalink Normal View History

fixed uniqueid so that it is a function as expected by index.js and elsewhere also added test for uniqueid. only test that two calls to uniqueid return unique enties. had to modify the output slightly and added a counter to the system otherwise two back to back calls would return the same value.
2015-01-16 16:21:26 -08:00
module.exports = (function() {
var counter = 0
return function() {
var id = ("pjax" + (new Date().getTime())) + "_" + counter
counter++
return id
}
})()
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.4 Page: 60ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API