Skip to content

Commit

Permalink
fixing whitespace consistency for jashkenas#718
Browse files Browse the repository at this point in the history
	all functions are formatted as such: `function(args) { ...`
  • Loading branch information
Sam Breed committed Nov 9, 2011
1 parent d9f4479 commit a0843bb
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// For all details and documentation:
// http://documentcloud.github.com/backbone

(function(){
(function() {

// Initial Setup
// -------------
Expand Down Expand Up @@ -64,7 +64,7 @@
//
// var object = {};
// _.extend(object, Backbone.Events);
// object.bind('expand', function(){ alert('expanded'); });
// object.bind('expand', function() { alert('expanded'); });
// object.trigger('expand');
//
Backbone.Events = {
Expand Down Expand Up @@ -153,7 +153,7 @@

// Initialize is an empty function by default. Override it with your own
// initialization logic.
initialize : function(){},
initialize : function() {},

// Return a copy of the model's `attributes` object.
toJSON : function() {
Expand Down Expand Up @@ -435,12 +435,12 @@

// Initialize is an empty function by default. Override it with your own
// initialization logic.
initialize : function(){},
initialize : function() {},

// The JSON representation of a Collection is an array of the
// models' attributes.
toJSON : function() {
return this.map(function(model){ return model.toJSON(); });
return this.map(function(model) { return model.toJSON(); });
},

// Add a model, or list of models to the set. Pass **silent** to avoid
Expand Down Expand Up @@ -497,7 +497,7 @@

// Pluck an attribute from each model in the collection.
pluck : function(attr) {
return _.map(this.models, function(model){ return model.get(attr); });
return _.map(this.models, function(model) { return model.get(attr); });
},

// When you have more items than you want to add or remove individually,
Expand Down Expand Up @@ -679,7 +679,7 @@

// Initialize is an empty function by default. Override it with your own
// initialization logic.
initialize : function(){},
initialize : function() {},

// Manually bind a single named route to a callback. For example:
//
Expand Down Expand Up @@ -915,7 +915,7 @@

// Initialize is an empty function by default. Override it with your own
// initialization logic.
initialize : function(){},
initialize : function() {},

// **render** is the core function that your view should override, in order
// to populate its element (`this.el`), with the appropriate HTML. The
Expand Down Expand Up @@ -1095,7 +1095,7 @@
// -------

// Shared empty constructor function to aid in prototype-chain creation.
var ctor = function(){};
var ctor = function() {};

// Helper function to correctly set up the prototype chain, for subclasses.
// Similar to `goog.inherits`, but uses a hash of prototype properties and
Expand All @@ -1109,7 +1109,7 @@
if (protoProps && protoProps.hasOwnProperty('constructor')) {
child = protoProps.constructor;
} else {
child = function(){ return parent.apply(this, arguments); };
child = function() { return parent.apply(this, arguments); };
}

// Inherit class (static) properties from parent.
Expand Down

0 comments on commit a0843bb

Please sign in to comment.