<commit_before>Backbone = require 'backbone'
Checklist = require '../models/checklist.coffee'
sd = require('sharify').data

module.exports = class Checklists extends Backbone.Collection

    url: -> "#{sd.API_URL}/api/checklists"

    model: Checklist

    forTemplate: ->
        checklists: @toJSON()
        sd: sd<commit_msg>Added comparator to sort lists in checklists view.<commit_after>Backbone = require 'backbone'
Checklist = require '../models/checklist.coffee'
sd = require('sharify').data

module.exports = class Checklists extends Backbone.Collection

    url: -> "#{sd.API_URL}/api/checklists"

    model: Checklist

    forTemplate: ->
        checklists: @toJSON()
        sd: sd

    comparator: (a, b) ->
        b.get('createdAt') - a.get('createdAt')
{'fraction_non_alphanumeric': 0.13506493506493505, 'fraction_numerical': 0.0, 'mean_word_length': 3.3559322033898304, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '2948517', 'n_tokens_mistral': 243, 'n_tokens_neox': 233, 'n_words': 55}