<commit_before>/**
 * Renders a log feed.
 *
 */
'use strict';
var ko = require('knockout');
var $ = require('jquery');
var moment = require('moment');
var Paginator = require('js/paginator');
var oop = require('js/oop');
require('knockout.punches');

var $osf = require('./osfHelpers');

ko.punches.enableAll();  // Enable knockout punches

ko.bindingHandlers.listing = {
    init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
    },
    update: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
        var value = valueAccessor();
        var valueUnwrapped = ko.unwrap(value);
        if (!Array.isArray(valueUnwrapped)) {<commit_msg>Add docstring to listing filter<commit_after>/**
 * Renders a log feed.
 *
 */
'use strict';
var ko = require('knockout');
var $ = require('jquery');
var moment = require('moment');
var Paginator = require('js/paginator');
var oop = require('js/oop');
require('knockout.punches');

var $osf = require('./osfHelpers');

ko.punches.enableAll();  // Enable knockout punches


/* A binding handler to convert lists into formatted lists, e.g.:
 * [dog] -> dog
 * [dog, cat] -> dog and cat
 * [dog, cat, fish] -> dog, cat, and fish
 *
 * This handler should not be used for user inputs.
 */
ko.bindingHandlers.listing = {
    update: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
        var value = valueAccessor();
        var valueUnwrapped = ko.unwrap(value);
        if (!Array.isArray(valueUnwrapped)) {
{'fraction_non_alphanumeric': 0.1540983606557377, 'fraction_numerical': 0.0, 'mean_word_length': 4.069767441860465, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2202572', 'n_tokens_mistral': 471, 'n_tokens_neox': 462, 'n_words': 131}