0.1.4 • Published 8 years ago
get-refile-url v0.1.4
get-refile-url
Get Refile URL from key using SHA.
See https://github.com/evanx/refile
Implementation
See https://github.com/evanx/get-refile-url/blob/master/index.js
const crypto = require('crypto');
module.exports = (refileDomain, key) => [
'https://' + config.refileDomain,
'key',
crypto.createHash('sha1').update(key).digest('hex').substring(0, 3),
key.replace(/\W/g, '-') + '.json'
].join('/')