Welcome to mirror list, hosted at ThFree Co, Russian Federation.

length.js « filters « common « angularjs « CoreHome « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a648347c49922ba02b86f2a01e1f919e1e00e22a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*!
 * Piwik - free/libre analytics platform
 *
 * @link http://piwik.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
(function () {
    angular.module('piwikApp.filter').filter('length', length);

    function length() {

        return function(stringOrArray) {
            if (stringOrArray && stringOrArray.length) {
                return stringOrArray.length;
            }

            return 0;
        };
    }

})();