expressionify
Version:
Simple node.js expression parser and evaluator using shunting-yard and reverse polish notation algorithms
15 lines (12 loc) • 335 B
JavaScript
;
exports.isObject = function(object) {
var type = typeof object;
return type === 'function' || type === 'object' && !!object;
};
exports.extend = function(destanation, source) {
for (var key in source) {destanation[key] = source[key];}
return destanation;
};
exports.peek = function(a) {
return a[a.length - 1];
};