Commit Graph

9 Commits

Author SHA1 Message Date
Braydon Fuller a50fccef4d Changes behavior of `toJSON` to work as expected with `JSON.stringify`
- see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON%28%29_behavior
- Updates CONTRIBUTING with changes to Stardard Methods
- Aliases toJSON for toObject
- Removes all `fromJSON` methods, and many cases replaces with `fromObject`
- Constructors expect an object parsed via `JSON.parse` for JSON input
2015-08-13 10:46:08 -04:00
Yemel Jardi d922a625b9 Rename toFiat() to atRate() 2014-12-28 17:40:11 -03:00
Yemel Jardi e7839d9ba2 Add from/to Fiat methods to Unit class 2014-12-25 19:04:03 -03:00
Esteban Ordano be599e5a1b Review Unit class
* Add 100% code coverage
* Add custom error code
* Linted source and test
* More descriptive test messages
2014-12-19 13:18:22 -03:00
Braydon Fuller dee30c749a Unit: Fixed bug, stringified toJSON output 2014-12-12 20:08:46 -05:00
Braydon Fuller 1858766627 Standardized toJSON, fromJSON, toString and fromString interfaces 2014-12-12 09:51:59 -05:00
Yemel Jardi 1ae88eed7a Add new test for string values 2014-12-01 16:05:01 -03:00
Yemel Jardi ab517cae9c refactor double quote 2014-12-01 16:02:28 -03:00
Yemel Jardi d978160ddb Utility for unit conversion 2014-12-01 12:33:45 -03:00