mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 17:58:17 +01:00
twenyone
This commit is contained in:
parent
00e8afb72e
commit
84057e8649
1 changed files with 5 additions and 0 deletions
|
@ -516,6 +516,11 @@ function isMathExpression(query) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function evaluateMathExpression(expression) {
|
function evaluateMathExpression(expression) {
|
||||||
|
// twenyone
|
||||||
|
if (expression.replace(/\s+/g, '') === '9+10') {
|
||||||
|
return '21';
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return eval(expression);
|
return eval(expression);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in a new issue