# force-num **Repository Path**: mirrors_stevemao/force-num ## Basic Information - **Project Name**: force-num - **Description**: Ensure environment variable exists and convert to a number. If not, throw to fail early. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-26 - **Last Updated**: 2025-09-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README > Ensure environment variable exists and convert to a number. If not, throw to fail early. ```ts import forceNum from 'force-num' const nodeEnv = forceNum('PORT') // => 3000, or throw if not set or not a number ``` ## Related - [force-env](https://github.com/stevemao/force-env) - Ensure environment variable exists. If not, throw to fail early.