Upgraded to fraction.js v1.9.0

This commit is contained in:
jos 2015-05-15 22:20:35 +02:00
parent 55d8e4f323
commit e6cbc8a346
3 changed files with 2 additions and 11 deletions

View File

@ -111,7 +111,7 @@ exports.create = function create(type) {
from: 'Fraction',
to: 'number',
convert: function (x) {
return x.toNumber();
return x.valueOf();
}
}
];

View File

@ -6,15 +6,6 @@ var Fraction = require('fraction.js');
Fraction.prototype.type = 'Fraction';
Fraction.prototype.isFraction = true;
/**
* Get the primitive value of a Fraction, a number
* @return {number} Returns a number
*/
// TODO: remove this when Fraction.js supports this itself.
Fraction.prototype.valueOf = function () {
return this.toNumber();
};
/**
* Get a JSON representation of a Fraction containing type information
* @returns {Object} Returns a JSON object structured as:

View File

@ -51,7 +51,7 @@
],
"dependencies": {
"decimal.js": "^4.0.2",
"fraction.js": "^1.7.0",
"fraction.js": "^1.9.0",
"tiny-emitter": "^1.0.0",
"typed-function": "^0.8.2"
},