Return a JSON representation of a number.
var number2jsonf = require( '@stdlib/number/float32/to-json' );Returns a JSON representation of a number.
var json = number2jsonf( NaN );
/* returns
{
'type': 'float32',
'value': 'NaN'
}
*/var number2jsonf = require( '@stdlib/number/float32/to-json' );
console.log( number2jsonf( NaN ) );