get-refile-url

0.1.4 • Public • Published

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('/')

Used by


https://twitter.com/@evanxsummers

Readme

Keywords

none

Package Sidebar

Install

npm i get-refile-url

Weekly Downloads

1

Version

0.1.4

License

ISC

Last publish

Collaborators

  • evanx