[Pkg-javascript-commits] [backbone] 71/281: fixing whitespace consistency for #718 all functions are formatted as such: `function(args) { ...`

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:01:57 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.9.0
in repository backbone.

commit a0843bb2eed9aededc8019d5d60c6bd1064c3f8c
Author: Sam Breed <sam at quickleft.com>
Date:   Tue Nov 8 17:13:53 2011 -0700

    fixing whitespace consistency for #718
    	all functions are formatted as such: `function(args) { ...`
---
 backbone.js | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/backbone.js b/backbone.js
index 41bdfbc..6c5607f 100644
--- a/backbone.js
+++ b/backbone.js
@@ -4,7 +4,7 @@
 //     For all details and documentation:
 //     http://documentcloud.github.com/backbone
 
-(function(){
+(function() {
 
   // Initial Setup
   // -------------
@@ -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 = {
@@ -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() {
@@ -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
@@ -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,
@@ -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:
     //
@@ -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
@@ -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
@@ -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.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git



More information about the Pkg-javascript-commits mailing list