sync fix to prefix and some usability improvements

This commit is contained in:
azivner
2017-11-26 23:10:23 -05:00
parent 37a105db4d
commit 8b5988e13c
8 changed files with 40 additions and 24 deletions

View File

@@ -66,6 +66,10 @@ function hash(text) {
return crypto.createHash('sha1').update(text).digest('base64');
}
function isEmptyOrWhitespace(str) {
return str === null || str.match(/^ *$/) !== null;
}
module.exports = {
randomSecureToken,
@@ -79,5 +83,6 @@ module.exports = {
hmac,
isElectron,
formatTwoTimestamps,
hash
hash,
isEmptyOrWhitespace
};