err-link
v1.0.0
Published
Build err.sh links
Downloads
3
Readme
err-link
Build err.sh links
Generate short links to error messages stored in the /errors
folder of your repositories. Read the blogpost for more.
Install
$ npm install err-link
Usage
const err = require('err-link')
err('zeit', 'now-cli', 'env-no-secret')
//=> 'https://err.sh/zeit/now-cli/env-no-secret'
const instance = err.instance('zeit', 'now-cli')
instance('env-no-secret')
//=> 'https://err.sh/zeit/now-cli/env-no-secret'
API
err(user, repo, code)
user
Type: string
The GitHub user or organization
repo
Type: string
The GitHub repository name
code
Type: string
The filename for the error message
err.instance(user[, repo])
Creates an instance of the err
function with the given preset values
user
Type: string
The GitHub user or organization
const err = require('err-link').instance('zeit')
err('now-cli', 'env-no-secret')
//=> 'https://err.sh/zeit/now-cli/env-no-secret'
repo
Type: string
The GitHub repository name
const err = require('err-link').instance('zeit', 'now-cli')
err('env-no-secret')
//=> 'https://err.sh/zeit/now-cli/env-no-secret'
Examples
Related
- err-sh - Microservice that forwards you to error messages
License
MIT © Avi Goldman