Rozbot/lib/promise/math-eval.js
2016-07-11 23:24:15 -04:00

8 lines
227 B
JavaScript

var algebrite = require('algebrite');
var promise = require('promise-polyfill');
module.exports = function(expression) {
return new promise(function(resolve, reject) {
resolve(algebrite.eval(expression).toString());
});
}