function number2json( x ) {
	if ( typeof x !== 'number' ) {
		throw new TypeError( format( 'invalid argument. Must provide a number. Value: `%s`.', x ) );
	}
	if ( x !== x ) {
		return {
			'type': 'float64',
			'value': 'NaN'
		};
	}
	if ( x === PINF ) {
		return {
			'type': 'float64',
			'value': '+Infinity'
		};
	}
	if ( x === NINF ) {
		return {
			'type': 'float64',
			'value': '-Infinity'
		};
	}
	return x;
}
Returns a JSON representation of a number.

@param {number} x - input value
@throws {TypeError} must provide a number
@returns {Object} JSON representation

@example
var json = number2json( NaN );
// returns { 'type': 'float64', 'value': 'NaN' }