From 4f018174ff8404e558a7b63d220c3b5cdcf8645b Mon Sep 17 00:00:00 2001 From: davidepastore Date: Sun, 22 Feb 2015 00:58:35 +0100 Subject: [PATCH] Add mode filter --- README.md | 9 +++++++++ src/_filter/math/mode.js | 36 +++++++++++++++++++++++++++++++++++ src/filters.js | 1 + test/spec/filter/math/mode.js | 27 ++++++++++++++++++++++++++ 4 files changed, 73 insertions(+) create mode 100644 src/_filter/math/mode.js create mode 100644 test/spec/filter/math/mode.js diff --git a/README.md b/README.md index 77ad954..d3a472c 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,7 @@ - [shortFmt](#shortfmt) - [byteFmt](#bytefmt) - [kbFmt](#kbfmt) + - [mode] (#mode) - [Boolean](#boolean) - [isNull](#isnull) - [isDefined](#isdefined) @@ -1222,6 +1223,14 @@ Converts kilobytes into formatted display
1 MB 1.00126 GB +``` +###mode +Calculates the mode value from all values within an array
+**Usage:** ```array | mode``` +```html +{{ [12,7,5,7] | mode }} +