UNPKG

dvf-client-js

Version:

<img src="https://avatars1.githubusercontent.com/u/56512535?s=200&v=4" align="right" />

12 lines (9 loc) 235 B
const DVFError = require('../dvf/DVFError') module.exports = (dvf, token) => { if (!token) { throw new DVFError('ERR_TOKEN_MISSING') } if (!dvf.token.getTokenInfo(token)) { throw new DVFError('ERR_INVALID_TOKEN') } }