0.2.1 • Published 2 months ago
@stdlib/number-float64-to-json v0.2.1
number2json
Return a JSON representation of a number.
Installation
npm install @stdlib/number-float64-to-json
Usage
var number2json = require( '@stdlib/number-float64-to-json' );
number2json( x )
Returns a JSON representation of a number.
var json = number2json( NaN );
/* returns
{
'type': 'float64',
'value': 'NaN'
}
*/
Examples
var number2json = require( '@stdlib/number-float64-to-json' );
console.log( number2json( NaN ) );
Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2024. The Stdlib Authors.