UNPKG

dvf-client-js

Version:

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

16 lines (12 loc) 306 B
const DVFError = require('../dvf/DVFError') module.exports = (dvf, amount) => { if (amount && typeof amount === 'string') { amount = +(amount) } if (!amount) { throw new DVFError('ERR_AMOUNT_MISSING') } if (amount && amount == 0) { throw new DVFError('ERR_INVALID_AMOUNT') } }