UNPKG

expressionify

Version:

Simple node.js expression parser and evaluator using shunting-yard and reverse polish notation algorithms

15 lines (12 loc) 335 B
'use strict'; 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]; };