<commit_before>/* vertebrae.js {(VERSION)}
 *
 * jQuery Plugin to mock AJAX requests for Backbone applications.
 * <NAME> @tbranyen, Copyright {(YEAR)}
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 * Date Built: {(DATE)}
 */
(function(global) {

// Internal state
var self = { vendor: {} };
// Cache internally all future defined routes
var _routes = {};
// Shorten Backbone regexp reference
var routeToRegExp = Backbone.Router.prototype._routeToRegExp;

// Load plugins
(function() {
  if (typeof jQuery !== "undefined") {
    {("lib/plugins/jquery"|include)}
  }

  // Vendor stuff
  {("vendor/backbone.localStorage"|include)}
}).call(global);

// Allow for Backbone augmentation
if (typeof Backbone !== "undefined") {

  // Main Backbone plugin function
  Backbone.Vertebrae = function(options) {
    var i, len, type;

    // Persistables
    if (this.persist && (len = this.persist.length)) {
      for (i = 0; i < len; i++) {
        this.persist[i].prototype.localStorage = new Backbone.Storage(this.profile || "");
      }
    }

    // Convert all URLs passed to regex and assign defaults if they
    // are not provided.
    _.each(this.routes, function(val, key) {
      _routes[key] = val;

      // Add in localStorage support
      if (type = val.model || val.collection) {
        type.prototype.localStorage = new Backbone.Storage(val.profile || "");<commit_msg>allow persist to be a function<commit_after>/* vertebrae.js {(VERSION)}
 *
 * jQuery Plugin to mock AJAX requests for Backbone applications.
 * <NAME> @tbranyen, Copyright {(YEAR)}
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 * Date Built: {(DATE)}
 */
(function(global) {

// Internal state
var self = { vendor: {} };
// Cache internally all future defined routes
var _routes = {};
// Shorten Backbone regexp reference
var routeToRegExp = Backbone.Router.prototype._routeToRegExp;

// Load plugins
(function() {
  if (typeof jQuery !== "undefined") {
    {("lib/plugins/jquery"|include)}
  }

  // Vendor stuff
  {("vendor/backbone.localStorage"|include)}
}).call(global);

// Allow for Backbone augmentation
if (typeof Backbone !== "undefined") {

  // Main Backbone plugin function
  Backbone.Vertebrae = function(options) {
    var i, len, type;

    // If persist is a function, call it
    if (typeof this.persist == "function") {
      this.persist = this.persist();
    }

    // Persistables
    if (this.persist && (len = this.persist.length)) {
      for (i = 0; i < len; i++) {
        this.persist[i].prototype.localStorage = new Backbone.Storage(this.profile || "");
      }
    }

    // Convert all URLs passed to regex and assign defaults if they
    // are not provided.
    _.each(this.routes, function(val, key) {
      _routes[key] = val;

      // Add in localStorage support
      if (type = val.model || val.collection) {
        type.prototype.localStorage = new Backbone.Storage(val.profile || "");
{'fraction_non_alphanumeric': 0.14105621805792162, 'fraction_numerical': 0.001362862010221465, 'mean_word_length': 3.100558659217877, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '447475', 'n_tokens_mistral': 913, 'n_tokens_neox': 877, 'n_words': 266}