Handle bigint as string to prevent precision loss

TIL dealing with bigints in javascript is a bit of a pain.

I had a weird issue of inserting correctly bigints on the db but getting off by a bit numbers on the response.

Apparently all the numbers in javascript are floating-point numbers<sup>[1]</sup> and the accuracy is only assured for integers ±2<sup>53</sup> between -9007199254740992 and 9007199254740992. 
However bigint ranges ±2<sup>63</sup>: -9223372036854775808 to 9223372036854775807 <sup>[2]</sup>.

The most common solution for handling bigint data on javascript is carry them with strings and use special libs for math operations. So strings it is.

However, I wonder if it may cause any troubles to anyone that is treating bigint as number on javascript-level and do some checks around that. Though they shouldn't since that only works till the ±2<sup>53</sup> range and is not the right way.

Anyway let me know what you think.
Thanks

[1]: http://www.irt.org/script/1031.htm
[2]: http://www.postgresql.org/docs/9.2/static/datatype-numeric.html