Skip to content

Commit

Permalink
cleanup: format object literals consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
davidchambers committed Jan 29, 2013
1 parent d117b59 commit f817bd1
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
12 changes: 6 additions & 6 deletions lib/api/manipulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,12 @@ var text = exports.text = function(str) {
}

var elem = {
data : encode(str),
type : 'text',
parent : null,
prev : null,
next : null,
children : []
data: encode(str),
type: 'text',
parent: null,
prev: null,
next: null,
children: []
};

// Append text node to each selected elements
Expand Down
8 changes: 4 additions & 4 deletions lib/cheerio.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ Cheerio.prototype.cheerio = '[cheerio object]';
*/

Cheerio.prototype.options = {
ignoreWhitespace : false,
xmlMode : false,
lowerCaseTags : false
ignoreWhitespace: false,
xmlMode: false,
lowerCaseTags: false
};

/*
Expand Down Expand Up @@ -125,7 +125,7 @@ function isHtml(str) {
Cheerio.prototype.make = function(dom, context) {
if (dom.cheerio) return dom;
dom = (_.isArray(dom)) ? dom : [dom];
return _.extend(context || new Cheerio(), dom, { length : dom.length });
return _.extend(context || new Cheerio(), dom, { length: dom.length });
};

/**
Expand Down
12 changes: 6 additions & 6 deletions lib/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ exports = module.exports = function(content, options) {

// Generic root element
var root = {
type : 'root',
name : 'root',
parent : null,
prev : null,
next : null,
children : []
type: 'root',
name: 'root',
parent: null,
prev: null,
next: null,
children: []
};

// Update the dom using the root
Expand Down
10 changes: 5 additions & 5 deletions lib/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ var singleTag = {
Tag types from htmlparser
*/
var tagType = {
tag : 1,
script : 1,
link : 1,
style : 1,
template : 1
tag: 1,
script: 1,
link: 1,
style: 1,
template: 1
};

var render = module.exports = function(dom, opts) {
Expand Down
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var entities = require('entities');
* HTML Tags
*/

var tags = { tag : true, script : true, style : true };
var tags = { tag: true, script: true, style: true };

/**
* Check if the DOM element is a tag
Expand Down

0 comments on commit f817bd1

Please sign in to comment.