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
7940a6e3e595dae970f670b0abfc2cc03d74d614
pjax/lib/uniqueid.js

9 lines
173 B
JavaScript
Raw 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() {
Switch linting to ESLint and Prettier (#191) * Switch linting to ESLint and Prettier * Clean up config * Prettier fixes
2019-02-13 22:26:57 -05:00
var counter = 0;
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
return function() {
Switch linting to ESLint and Prettier (#191) * Switch linting to ESLint and Prettier * Clean up config * Prettier fixes
2019-02-13 22:26:57 -05:00
var id = "pjax" + new Date().getTime() + "_" + counter;
counter++;
return id;
};
})();
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.4 Page: 28ms 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