GitXplorerGitXplorer
K

StringNumber

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
2f6558f609e49f385c4ca379c378a0ad13fa4b7a

package update

KKeKs0r committed 9 years ago
Unverified
63121e525f9c138e542edb164a6728fb9bf9a8a1

another test

KKeKs0r committed 9 years ago
Unverified
6253ec8c17c02c40c9a07f4b0adbee6428b992e5

prototype

KKeKs0r committed 9 years ago
Unverified
f91a1ac6c9a18901070b0a6ef1d7369ad2d3dc4b

new version

KKeKs0r committed 9 years ago
Unverified
7a1b236831bd50a43a28f35b6beb0ee21727b649

rename + ignore

KKeKs0r committed 9 years ago
Unverified
fe836d9e66a1dcdb100d2958878b59de75fe673a

tests

KKeKs0r committed 9 years ago

README

The README file for this repository.

StringNumber

JSON.parse/stringify that converts big numbers into strings. Based on json-bigint.

While most JSON parsers assume numeric values have same precision restrictions as IEEE 754 double, JSON specification does not say anything about number precision. Any floating point number in decimal (optionally scientific) notation is valid JSON value. It's a good idea to serialize values which might fall out of IEEE 754 integer precision as strings in your JSON api, but { "value" : 9223372036854775807}, for example, is still a valid RFC4627 JSON string, and in most JS runtimes the result of JSON.parse is this object: { value: 9223372036854776000 }