This repository has been archived on 2026-03-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files

14 lines
219 B
JavaScript

'use strict'
const asFloat = require('./float')
module.exports = function asFloatPositive (value) {
const ret = asFloat(value)
if (ret < 0) {
throw new Error('should be a positive float')
}
return ret
}