Skip to content

Commit

Permalink
Merge pull request #105 from cabal-club/export-ishypercorekey
Browse files Browse the repository at this point in the history
export Cabal.isHypercoreKey
  • Loading branch information
cblgh authored Aug 21, 2021
2 parents 0afe277 + 1d750c4 commit d6f69b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ function isHypercoreKey (key) {
if (typeof key === 'string') return /^[0-9A-Fa-f]{64}$/.test(key)
else if (Buffer.isBuffer(key)) return key.length === 32
}
module.exports.isHypercoreKey = isHypercoreKey

// Ensures 'key' is a hex string
function sanitizeKey (key) {
Expand Down

0 comments on commit d6f69b3

Please sign in to comment.