some tweaks mainly for electron support

This commit is contained in:
azivner
2017-11-05 17:58:55 -05:00
parent 0481b1b79c
commit b890c9982b
7 changed files with 101 additions and 13 deletions

View File

@@ -44,6 +44,10 @@ function browserId(req) {
return req.get('x-browser-id');
}
function isElectron() {
return !!process.versions['electron'];
}
module.exports = {
randomSecureToken,
randomString,
@@ -52,5 +56,6 @@ module.exports = {
toBase64,
fromBase64,
hmac,
browserId
browserId,
isElectron
};