Add filter to retrieve number of keys in objects.

This commit is contained in:
Paulo Reis 2017-02-17 14:31:50 +00:00
parent 1f92a494e7
commit 1e66c46ca7
2 changed files with 6 additions and 0 deletions

View file

@ -10,5 +10,6 @@ define [
"ide/review-panel/directives/resolvedCommentsDropdown"
"ide/review-panel/directives/reviewPanelCollapseHeight"
"ide/review-panel/filters/notEmpty"
"ide/review-panel/filters/numKeys"
"ide/review-panel/filters/orderOverviewEntries"
], () ->

View file

@ -0,0 +1,5 @@
define [
"base"
], (App) ->
app.filter "numKeys", () ->
(object) -> Object.keys(object).length