In my postgres table I have a field which is type
var types = require('pg').types
types.setTypeParser(1700, 'text', parseFloat);
You can find more info on this in this related SO question.
As suggested in the comments, if you really need higher precision, you can use a library like big.js.
You can see how it works in this fiddle, look at this code example:
const Big = require('big.js'); const a = 400.12345678901234567890; console.log(a - 300); // 100.12345678901232 :-( const b = new Big('400.12345678901234567890'); console.log(b.minus(300).toString()); // 100.1234567890123456789 :-)