1.0.0 • Published 4 years ago
force-num v1.0.0
Ensure environment variable exists and convert to a number. If not, throw to fail early.
import forceNum from 'force-num'
const nodeEnv = forceNum('PORT')
// => 3000, or throw if not set or not a number
1.0.0
4 years ago