UNPKG

magicpatch

Version:

Adds IPython / Jupyter magic commands to IJavascript

14 lines (11 loc) 271 B
function numberParser(name, val) { let ret = parseInt(val); // eslint-disable-next-line eqeqeq if (ret != val) { throw new TypeError(`${name} expected number argument but got ${val}`); } return ret; } module.exports = { numberParser, };