diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-12-25 12:42:41 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-12-25 12:42:41 -1000 |
commit | 399d0a666d1f8d2956c81279a98bed3c483dea51 (patch) | |
tree | cbedd0297e34738c6f7243324712b655250a4758 /lib/util.js | |
parent | b48b730900193fd19ce40192f0252593efa12f95 (diff) | |
download | patchfoo-399d0a666d1f8d2956c81279a98bed3c483dea51.tar.gz patchfoo-399d0a666d1f8d2956c81279a98bed3c483dea51.zip |
Allow using ooo (out-of-order message replication)
Diffstat (limited to 'lib/util.js')
-rw-r--r-- | lib/util.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/util.js b/lib/util.js index fb0b13f..7425513 100644 --- a/lib/util.js +++ b/lib/util.js @@ -5,12 +5,13 @@ var b64url = require('base64-url') var u = exports u.ssbRefRegex = /((?:@|%|&|ssb:\/\/%)[A-Za-z0-9\/+]{43}=\.[\w\d]+)/g +u.ssbRefRegexOnly = /^(?:@|%|&|ssb:\/\/%)[A-Za-z0-9\/+]{43}=\.[\w\d]+$/ u.ssbRefEncRegex = /((?:ssb:\/\/)?(?:[@%&]|%26|%40|%25)(?:[A-Za-z0-9\/+]|%2[fF]|%2[bB]){43}(?:=|%3[dD])\.[\w\d]+)/g u.isRef = function (str) { if (!str) return false - u.ssbRefRegex.lastIndex = 0 - return u.ssbRefRegex.test(str) + u.ssbRefRegexOnly.lastIndex = 0 + return u.ssbRefRegexOnly.test(str) } u.readNext = function (fn) { |