Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cleanup: format object literals consistently

  • Loading branch information...
commit f817bd15587b86b30f6dc2e091c8b7ed1a0bbf62 1 parent d117b59
@davidchambers davidchambers authored
View
12 lib/api/manipulation.js
@@ -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
View
8 lib/cheerio.js
@@ -94,9 +94,9 @@ Cheerio.prototype.cheerio = '[cheerio object]';
*/
Cheerio.prototype.options = {
- ignoreWhitespace : false,
- xmlMode : false,
- lowerCaseTags : false
+ ignoreWhitespace: false,
+ xmlMode: false,
+ lowerCaseTags: false
};
/*
@@ -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 });
};
/**
View
12 lib/parse.js
@@ -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
View
10 lib/render.js
@@ -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) {
View
2  lib/utils.js
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.