@sharyn/util.inlinethrow
v1.0.1
Published
**`inlineThrow`** is a function that `throw`s its argument. Unlike a regular `throw`, it's an expression and can be used anywhere.
Downloads
12
Readme
🌹 inlineThrow
inlineThrow is a function that throws its argument. Unlike a regular throw, it's an expression and can be used anywhere.
const number = isNan(string) ? inlineThrow(Error('Not a number')) : parseInt(string)inlineThrow is part of @sharyn/util
