awspilot / dynamodb-oop

Speak fluent DynamoDB, write code with fashion, I Promise() 😃
https://awspilot.dev
MIT License
119 stars 28 forks source link

Allow for int or decimal values to be parsed from db objects #6

Closed davehermann closed 9 years ago

davehermann commented 9 years ago

parseInt() will only translate the integer portion of a numeric value, not a decimal. This allows for parsing of any numeric value from the stored string.

adrianpraja commented 9 years ago

Thanks for the fix,

We've been dealing with decimals, mostly amounts using parseInt( * 100) to get rid of the decimal part and didn't even realized that the library is not supporting decimal numbers, guess parseFloat would also do it