@quantlab/handsontable
Version:
Spreadsheet-like data grid editor that provides copy/paste functionality compatible with Excel/Google Docs
16 lines (11 loc) • 322 B
JavaScript
import { toNumber } from './../../helper/number';
import { ERROR_VALUE } from './../../error';
export var SYMBOL = '^';
export default function func(exp1, exp2) {
var result = Math.pow(toNumber(exp1), toNumber(exp2));
if (isNaN(result)) {
throw Error(ERROR_VALUE);
}
return result;
}
func.SYMBOL = SYMBOL;