Вход Регистрация
Файл: error-kitty/node_modules/cheerio/lib/utils.js
Строк: 61
<?php
/**
 * HTML Tags
 */

var tags = { tagtruescripttruestyletrue };

/**
 * Check if the DOM element is a tag
 *
 * isTag(type) includes <script> and <style> tags
 */

exports.isTag = function(type) {
  if (
type.typetype 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();
  });
};

/**
 * Convert a string from camel case to "CSS case", where word boundaries are
 * described by hyphens ("-") and all characters are lower-case.
 * @param  {String} str String to be converted.
 * @return {string}     String in "CSS case".
 */
exports.cssCase = function(str) {
  return 
str.replace(/[A-Z]/g'-$&').toLowerCase();
};

/**
 * Iterate over each DOM element without creating intermediary Cheerio instances.
 *
 * This is indented for use internally to avoid otherwise unnecessary memory pressure introduced
 * by _make.
 */

exports.domEach = function(cheeriofn) {
  var 
0len cheerio.length;
  while (
len && fn(icheerio[i]) !== false) ++i;
  return 
cheerio;
};
?>
Онлайн: 1
Реклама