HOME


sh-3ll 1.0
DIR:/proc/self/root/proc/self/cwd/bright.medisavehealthcarebd.com/node_modules/type/number/
Upload File :
Current File : //proc/self/root/proc/self/cwd/bright.medisavehealthcarebd.com/node_modules/type/number/coerce.js
"use strict";

var isValue = require("../value/is");

module.exports = function (value) {
	if (!isValue(value)) return null;
	try {
		value = +value; // Ensure implicit coercion
	} catch (error) {
		return null;
	}
	if (isNaN(value)) return null;
	return value;
};