{"size": 530, "ext": "js", "max_stars_repo_path": "www/dist/dist_js/app/filters.js", "max_stars_repo_name": "npmmirror/bibi-ionic", "max_stars_repo_stars_event_min_datetime": "2017-03-24T11:29:28.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-24T13:17:35.000Z", "max_issues_repo_path": "www/dist/dist_js/app/filters.js", "max_issues_repo_name": "npmmirror/bibi-ionic", "max_issues_repo_issues_event_min_datetime": "2017-05-20T09:55:18.000Z", "max_issues_repo_issues_event_max_datetime": "2017-05-20T09:55:18.000Z", "max_forks_repo_path": "www/dist/dist_js/app/filters.js", "max_forks_repo_name": "npmmirror/bibi-ionic", "max_forks_repo_forks_event_min_datetime": "2017-03-24T11:29:36.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-12T07:32:32.000Z"}
{"max_stars_count": 178, "max_issues_count": 1, "max_forks_count": 132, "avg_line_length": 26.5, "max_line_length": 92, "alphanum_fraction": 0.5339622642}
"use strict";

angular.module('maybi.filters', [])

.filter('reverse', function() {
    return function(items) {
        if (!angular.isArray(items)) return false;
        return items.slice().reverse();
    };
})

.filter('nl2br', ['$sce', function($sce){
    return function(msg,is_xhtml) {
        var is_xhtml = is_xhtml || true;
        var breakTag = (is_xhtml) ? '<br />' : '<br>';
        var msg = (msg + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1'+ breakTag +'$2');
        return $sce.trustAsHtml(msg);
    }
}])
