| Index: tools/vulcanize/node_modules/vulcanize/node_modules/cheerio/lib/utils.js
|
| diff --git a/tools/vulcanize/node_modules/vulcanize/node_modules/cheerio/lib/utils.js b/tools/vulcanize/node_modules/vulcanize/node_modules/cheerio/lib/utils.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..54afaaed69dd84e73e5d8e4fa185270cdc6aebc4
|
| --- /dev/null
|
| +++ b/tools/vulcanize/node_modules/vulcanize/node_modules/cheerio/lib/utils.js
|
| @@ -0,0 +1,42 @@
|
| +/**
|
| + * Module Dependencies
|
| + */
|
| +var entities = require('entities');
|
| +
|
| +/**
|
| + * HTML Tags
|
| + */
|
| +
|
| +var tags = { tag: true, script: true, style: true };
|
| +
|
| +/**
|
| + * Check if the DOM element is a tag
|
| + *
|
| + * isTag(type) includes <script> and <style> tags
|
| + */
|
| +
|
| +exports.isTag = function(type) {
|
| + if (type.type) type = type.type;
|
| + return tags[type] || false;
|
| +};
|
| +
|
| +/**
|
| + * Convert a string to camel case notation.
|
| + * @param {String} str String to be converted.
|
| + * @return {String} String in camel case notation.
|
| + */
|
| +
|
| +exports.camelCase = function(str) {
|
| + return str.replace(/[_.-](\w|$)/g, function(_, x) {
|
| + return x.toUpperCase();
|
| + });
|
| +};
|
| +
|
| +/**
|
| + * Expose encode and decode methods from FB55's node-entities library
|
| + *
|
| + * 0 = XML, 1 = HTML4 and 2 = HTML5
|
| + */
|
| +
|
| +exports.encode = function(str) { return entities.encode(String(str), 0); };
|
| +exports.decode = function(str) { return entities.decode(str, 2); };
|
|
|