dat-string-key
1.0.0 • Public • Published dat-string-key
Might return a Dat string key
- valid string/buffer: Returns a dat key as a string
- invalid key: Throws error
- null: Returns null
Usage
var strKeyMaybe = require('dat-string-key')
var key = strKeyMaybe(new Buffer(process.argv[2], 'hex'))
try {
console.log('maybe a key: key valid or null', strKeyMaybe(key))
} catch (e) {
console.log('key not valid')
}
License
MIT
Readme
Keywords
nonePackage Sidebar
Install
Weekly Downloads