From fd822bdaf9d04e522aaa5400b673f333190abe98 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Fri, 7 Oct 2011 11:27:49 -0700 Subject: chore(formating): clean code to be function() { --- docs/src/ngdoc.js | 78 +++++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) (limited to 'docs/src/ngdoc.js') diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js index 1a4f5d25..a154ae7d 100644 --- a/docs/src/ngdoc.js +++ b/docs/src/ngdoc.js @@ -37,14 +37,14 @@ function Doc(text, file, line) { this.events = this.events || []; this.links = this.links || []; } -Doc.METADATA_IGNORE = (function(){ +Doc.METADATA_IGNORE = (function() { var words = require('fs').readFileSync(__dirname + '/ignore.words', 'utf8'); return words.toString().split(/[,\s\n\r]+/gm); })(); Doc.prototype = { - keywords: function keywords(){ + keywords: function keywords() { var keywords = {}; Doc.METADATA_IGNORE.forEach(function(ignore){ keywords[ignore] = true; }); var words = []; @@ -83,7 +83,7 @@ Doc.prototype = { return this.section + '/' + url; }, - markdown: function (text) { + markdown: function(text) { if (!text) return text; var self = this, @@ -151,7 +151,7 @@ Doc.prototype = { return parts.join(''); }, - parse: function(){ + parse: function() { var atName; var atText; var match; @@ -180,7 +180,7 @@ Doc.prototype = { this['this'] = this.markdown(this['this']); return this; - function flush(){ + function flush() { if (atName) { var text = trim(atText.join('\n')); if (atName == 'param') { @@ -234,11 +234,11 @@ Doc.prototype = { } }, - html: function(){ + html: function() { var dom = new DOM(), self = this; - dom.h(this.name, function(){ + dom.h(this.name, function() { notice('workInProgress', 'Work in Progress', 'This page is currently being revised. It might be incomplete or contain inaccuracies.'); notice('deprecated', 'Deprecated API', self.deprecated); @@ -247,13 +247,13 @@ Doc.prototype = { dom.h('Description', self.description, dom.html); } dom.h('Dependencies', self.requires, function(require){ - dom.tag('code', function(){ + dom.tag('code', function() { dom.tag('a', {href: 'api/angular.service.' + require.name}, require.name); }); dom.html(require.text); }); - (self['html_usage_' + self.ngdoc] || function(){ + (self['html_usage_' + self.ngdoc] || function() { throw new Error("Don't know how to format @ngdoc: " + self.ngdoc); }).call(self, dom); @@ -276,10 +276,10 @@ Doc.prototype = { html_usage_parameters: function(dom) { dom.h('Parameters', this.param, function(param){ - dom.tag('code', function(){ + dom.tag('code', function() { dom.text(param.name); if (param.optional) { - dom.tag('i', function(){ + dom.tag('i', function() { dom.text('(optional'); if(param['default']) { dom.text('=' + param['default']); @@ -298,7 +298,7 @@ Doc.prototype = { html_usage_returns: function(dom) { var self = this; if (self.returns) { - dom.h('Returns', function(){ + dom.h('Returns', function() { dom.tag('code', '{' + self.returns.type + '}'); dom.text('– '); dom.html(self.returns.description); @@ -319,8 +319,8 @@ Doc.prototype = { html_usage_function: function(dom){ var self = this; - dom.h('Usage', function(){ - dom.code(function(){ + dom.h('Usage', function() { + dom.code(function() { dom.text(self.name.split('service.').pop()); dom.text('('); self.parameters(dom, ', '); @@ -335,8 +335,8 @@ Doc.prototype = { html_usage_property: function(dom){ var self = this; - dom.h('Usage', function(){ - dom.code(function(){ + dom.h('Usage', function() { + dom.code(function() { dom.text(self.name); }); @@ -346,8 +346,8 @@ Doc.prototype = { html_usage_directive: function(dom){ var self = this; - dom.h('Usage', function(){ - dom.tag('pre', {'class':"brush: js; html-script: true;"}, function(){ + dom.h('Usage', function() { + dom.tag('pre', {'class':"brush: js; html-script: true;"}, function() { dom.text('<' + self.element + ' '); dom.text(self.shortName); if (self.param.length) { @@ -362,9 +362,9 @@ Doc.prototype = { html_usage_filter: function(dom){ var self = this; - dom.h('Usage', function(){ - dom.h('In HTML Template Binding', function(){ - dom.tag('code', function(){ + dom.h('Usage', function() { + dom.h('In HTML Template Binding', function() { + dom.tag('code', function() { dom.text('{{ '); dom.text(self.shortName); dom.text('_expression | '); @@ -374,8 +374,8 @@ Doc.prototype = { }); }); - dom.h('In JavaScript', function(){ - dom.tag('code', function(){ + dom.h('In JavaScript', function() { + dom.tag('code', function() { dom.text('angular.filter.'); dom.text(self.shortName); dom.text('('); @@ -392,8 +392,8 @@ Doc.prototype = { html_usage_inputType: function(dom){ var self = this; - dom.h('Usage', function(){ - dom.code(function(){ + dom.h('Usage', function() { + dom.code(function() { dom.text('