Skip to content

Commit

Permalink
add log2 & log10, document exists & empty
Browse files Browse the repository at this point in the history
  • Loading branch information
cshaa committed Sep 18, 2021
1 parent 7c0873a commit 4484d1b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,12 @@ Built-in functions | Description
--- | ---
abs(x) | Absolute value
ceil(x) | Round floating point up
empty(x) | True if _x_ is `undefined`, `null`, an empty array or an empty string
exists(x) | True unless _x_ is `undefined` or `null`
floor(x) | Round floating point down
log(x) | Natural logarithm
log2(x) | Logarithm base two
log10(x) | Logarithm base ten
max(a, b, c...) | Max value (variable length of args)
min(a, b, c...) | Min value (variable length of args)
round(x) | Round floating point
Expand Down
2 changes: 2 additions & 0 deletions src/filtrex.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ export function compileExpression(expression, options) {
ceil: Math.ceil,
floor: Math.floor,
log: Math.log,
log2: Math.log2,
log10: Math.log10,
max: Math.max,
min: Math.min,
round: Math.round,
Expand Down

0 comments on commit 4484d1b

Please sign in to comment.