<commit_before>/**
 * Backbone localStorage Adapter
 *
 * https://github.com/jeromegn/Backbone.localStorage
 */(function(a,b){typeof define=="function"&&define.amd?define(["underscore","backbone"],function(c,d){return b(c||a._,d||a.Backbone)}):b(_,Backbone)})(this,function(a,b){function c(){return((1+Math.random())*65536|0).toString(16).substring(1)}function d(){return c()+c()+"-"+c()+"-"+c()+"-"+c()+"-"+c()+c()+c()}return b.LocalStorage=window.Store=function(a){this.name=a;var b=this.localStorage().getItem(this.name);this.records=b&&b.split(",")||[]},a.extend(b.LocalStorage.prototype,{save:function(){this.localStorage().setItem(this.name,this.records.join(","))},create:function(a){return a.id||(a.id=d(),a.set(a.idAttribute,a.id)),this.localStorage().setItem(this.name+"-"+a.id,JSON.stringify(a)),this.records.push(a.id.toString()),this.save(),a.toJSON()},update:function(b){return this.localStorage().setItem(this.name+"-"+b.id,JSON.stringify(b)),a.include(this.records,b.id.toString())||this.records.push(b.id.toString()),this.save(),b.toJSON()},find:function(a){return JSON.parse(this.localStorage().getItem(this.name+"-"+a.id))},findAll:function(){return a(this.records).chain().map(function(a){return JSON.parse(this.localStorage().getItem(this.name+"-"+a))},this).compact().value()},destroy:function(b){return this.localStorage().removeItem(this.name+"-"+b.id),this.records=a.reject(this.records,function(a){return a==b.id.toString()}),this.save(),b},localStorage:function(){return localStorage}}),b.LocalStorage.sync=window.Store.sync=b.localSync=function(a,b,c){var d=b.localStorage||b.collection.localStorage,e,f=$.Deferred&&$.Deferred();switch(a){case"read":e=b.id!=undefined?d.find(b):d.findAll();break;case"create":e=d.create(b);break;case"update":e=d.update(b);break;case"delete":e=d.destroy(b)}return e?(c&&c.success&&c.success(e),f&&f.resolve()):(c&&c.error&&c.error("Record not found"),f&&f.reject()),f&&f.promise()},b.ajaxSync=b.sync,b.getSyncMethod=function(a){return a.localStorage||a.collection&&a.collection.localStorage?b.localSync:b.ajaxSync},b.sync=function(a,c,d){return b.getSyncMethod(c).apply(this,[a,c,d])},b.LocalStorage});<commit_msg>make minified version<commit_after>/**
 * Backbone localStorage Adapter
 *
 * https://github.com/jeromegn/Backbone.localStorage
 */(function(e,t){typeof define=="function"&&define.amd?define(["underscore","backbone"],function(n,r){return t(n||e._,r||e.Backbone)}):t(_,Backbone)})(this,function(e,t){function n(){return((1+Math.random())*65536|0).toString(16).substring(1)}function r(){return n()+n()+"-"+n()+"-"+n()+"-"+n()+"-"+n()+n()+n()}return t.LocalStorage=window.Store=function(e){this.name=e;var t=this.localStorage().getItem(this.name);this.records=t&&t.split(",")||[]},e.extend(t.LocalStorage.prototype,{save:function(){this.localStorage().setItem(this.name,this.records.join(","))},create:function(e){return e.id||(e.id=r(),e.set(e.idAttribute,e.id)),this.localStorage().setItem(this.name+"-"+e.id,JSON.stringify(e)),this.records.push(e.id.toString()),this.save(),e.toJSON()},update:function(t){return this.localStorage().setItem(this.name+"-"+t.id,JSON.stringify(t)),e.include(this.records,t.id.toString())||this.records.push(t.id.toString()),this.save(),t.toJSON()},find:function(e){return this.jsonData(this.localStorage().getItem(this.name+"-"+e.id))},findAll:function(){return e(this.records).chain().map(function(e){return this.jsonData(this.localStorage().getItem(this.name+"-"+e))},this).compact().value()},destroy:function(t){return this.localStorage().removeItem(this.name+"-"+t.id),this.records=e.reject(this.records,function(e){return e==t.id.toString()}),this.save(),t},localStorage:function(){return localStorage},jsonData:function(e){return e&&JSON.parse(e)}}),t.LocalStorage.sync=window.Store.sync=t.localSync=function(e,t,n){var r=t.localStorage||t.collection.localStorage,i,s=$.Deferred&&$.Deferred();switch(e){case"read":i=t.id!=undefined?r.find(t):r.findAll();break;case"create":i=r.create(t);break;case"update":i=r.update(t);break;case"delete":i=r.destroy(t)}return i?(n&&n.success&&n.success(i),s&&s.resolve()):(n&&n.error&&n.error("Record not found"),s&&s.reject()),n&&n.complete&&n.complete(i),s&&s.promise()},t.ajaxSync=t.sync,t.getSyncMethod=function(e){return e.localStorage||e.collection&&e.collection.localStorage?t.localSync:t.ajaxSync},t.sync=function(e,n,r){return t.getSyncMethod(n).apply(this,[e,n,r])},t.LocalStorage});
{'fraction_non_alphanumeric': 0.2662761883307051, 'fraction_numerical': 0.004505519261094841, 'mean_word_length': 12.333333333333334, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '7292096', 'n_tokens_mistral': 1632, 'n_tokens_neox': 1627, 'n_words': 56}