jpillora / node-edit-google-spreadsheet

A simple API for editing Google Spreadsheets
304 stars 101 forks source link

Using parseFloat on strings causes IP addresses and other strings to be interpreted incorrectly #24

Closed dct-adam closed 10 years ago

dct-adam commented 10 years ago

/lib/util.js

if(typeof obj === 'string') { var res = parseFloat(obj, 10); if(isNaN(res)) return obj; return res; }

This code makes an IP address such as '192.168.1.1' be interpreted as a float 192.168, making the returned data unusable.

jpillora commented 10 years ago

Will put this https://github.com/jpillora/node-edit-google-spreadsheet/issues/22 fix in release