/*jshint camelcase: false
512349
function purgeDeps(opts, diff, meta) {
    if (!diff) {
        return;
    }

    var depsKey = 'dependencies' in diff ?
        'dependencies' : 'dependencies__deleted' in diff ?
        'dependencies__deleted' : 'dependencies__added' in diff ?
        'dependencies__added' : null;
    if (!depsKey) {
        return diff;
    }

    var deps = diff[depsKey];

    diff[depsKey] = Object.keys(deps).reduce(function (acc, key) {
        var deleted = meta.deleted ? meta.deleted :
            (key.indexOf('__deleted') !== -1 ||
            depsKey === 'dependencies__deleted');
        var added = meta.added ? meta.added :
            (key.indexOf('__added') !== -1 ||
            depsKey === 'dependencies__added');
        if (deleted || added) {
            if (meta.depth >= opts.depth) {
                if (!opts.short) {
                    deps[key].dependencies = '[NestedObject]';
                    acc[key] = deps[key];
                } else {
                    acc[key] = (deleted ? '[Deleted' : '[Added') +
                        '@' + deps[key].version + ']';
                }
            } else {
                acc[key] = purgeDeps(opts, deps[key], {
                    depth: meta.depth + 1,
                    added: added,
                    deleted: deleted
                });
            }
        } else {
            acc[key] = purgeDeps(opts, deps[key], {
                depth: meta.depth + 1
            });
        }

        return acc;
    }, {});

    return diff;
}
942053
function stringCase(str, caseValue) {
		switch (String(caseValue || '').toLowerCase()) {
			case 'lower':
				return str.toLowerCase();
			case 'upper':
				return str.toUpperCase();
		}
		
		return str;
	}
867445
function(str) {
  var abbrRegex = /^\-(\w+?)$/,
      fullRegex = /^\-\-(no\-)?(.+?)(?:=(.+))?$/,
      valRegex = /^[^\-].*/;

  var charMatch = abbrRegex.exec(str),
      chars = charMatch && charMatch[1].split("");

  var fullMatch = fullRegex.exec(str),
      full = fullMatch && fullMatch[2];

  var isValue = str !== undefined && (str === "" || valRegex.test(str));
  var value;
  if (isValue) {
    value = str;
  }
  else if (full) {
    value = fullMatch[1] ? false : fullMatch[3];
  }

  return {
    str: str,
    chars: chars,
    full: full,
    value: value,
    isValue: isValue
  }
}
74469
function camelCase(str, next) {
    let output = '';
    for (const c of str) {
        if (c === '_') {
            next = true;
            continue;
        }
        output += next ? c.toUpperCase() : c;
        next = false;
    }
    return output;
}
712632
function camelToKebab( string ) {
	return string.replace( ptnCamel, ( all, predecessor, match ) => predecessor + "-" + match.toLocaleLowerCase() );
}
1042515
function camelCase(name) {
  return name.
    replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
      return offset ? letter.toUpperCase() : letter;
    }).
    replace(MOZ_HACK_REGEXP, 'Moz$1');
}
1274300
function sanitize (val) {
  if (typeof val !== 'string') {
    return '';
  }
  val = val.replace(/&/g,'&amp;');
  val = val.replace(/"/g,'&quot;');
  val = val.replace(/'/g,'&#039;');
  val = val.replace(/</g,'&lt;');
  val = val.replace(/>/g,'&gt;');
  val = val.replace(/\n/g,'<br />');
  return val ;
}
44988
function camelCase(str, { upperCase = false } = {}) {
  if (str.length === 0) {
    return str;
  }

  if (upperCase && isAllUpperCaseSnakeCase(str)) {
    // Only convert to lower case if the string is all upper
    // case snake_case. This allowes camelCase strings to go
    // through without changing.
    str = str.toLowerCase();
  }

  let out = str[0];

  for (let i = 1, l = str.length; i < l; ++i) {
    const char = str[i];
    const prevChar = str[i - 1];

    if (char !== '_') {
      if (prevChar === '_') {
        out += char.toUpperCase();
      } else {
        out += char;
      }
    }
  }

  return out;
}
765645
function objToString(obj, commentFix = false) {
  const comment = commentFix ? '/**/' : ''

  return Object.keys(obj).reduce((acc, k) => {
    let value = obj[k]

    if (k.startsWith('__spread__')) {
      return acc + '${' + value + '};' + comment
    }

    if (typeof value === 'string') {
      if (value[0] === '$') {
        value = '${' + value.substr(1) + '}'
      }
      return acc + camelToKebab(k) + ':' + value + ';' + comment
    } else {
      value = objToString(value)
      let key = k[0] === ':' ? '&' + k : k
      key = key[0] === '`' ? key.substr(1, key.length - 2) : key
      return acc + camelToKebab(key) + '{' + value + '};' + comment
    }
  }, '')
}
279817
function processHtmlAttributes(input = {}) {
    const attributes = {};
    const htmlAttributes = input.htmlAttributes;
    const wildcardAttributes = input['*'];

    let obj = htmlAttributes || wildcardAttributes;
    if (htmlAttributes && wildcardAttributes) {
        obj = Object.assign(wildcardAttributes, htmlAttributes);
    }

    if (obj) {
        Object.keys(obj).forEach((key) => {
            attributes[camelToKebab(key)] = obj[key];
        });
    }

    return attributes;
}
249962
function camelCase(str) {
    // Replace special characters with a space
    str = str.replace(/[^a-zA-Z0-9 ]/g, ' ');
    // put a space before an uppercase letter
    str = str.replace(/([a-z](?=[A-Z]))/g, '$1 ');
    // Lower case first character and some other stuff
    str = str.replace(/([^a-zA-Z0-9 ])|^[0-9]+/g, '').trim().toLowerCase();
    // uppercase characters preceded by a space or number
    str = str.replace(/([ 0-9]+)([a-zA-Z])/g, function (a, b, c) {
        return b.trim() + c.toUpperCase();
    });
    return str;
}
589684
function camelCase (str, capitaliseLead = false) {
  str = str.replace(/_([a-z])/g, (group) => {
    if (group[1]) {
      return group[1].toUpperCase()
    }
  })
  if (capitaliseLead) {
    return str.charAt(0).toUpperCase() + str.slice(1)
  } else {
    return str
  }
}
1152979
function(sId) {

			//Match camelCase - case sensitive
			var idRegEx = /^[a-z][a-zA-Z]+$/;

			if (
				!sId || typeof sId !== 'string') {
				return false;
			}

			if (sId.match(idRegEx) && this.validateStringLength(sId, 6, 50)) {
				return true;
			}

			return false;
	}
515610
function transformKeysToCamelCase (obj) {
  var camelKey;
  var key;
  for (key in obj) {
    camelKey = toCamelCase(key);
    if (key === camelKey) { continue; }
    obj[camelKey] = obj[key];
    delete obj[key];
  }
  return obj;
}
1069536
def camelize(string, lowercase = false)
      result = string
        .to_s
        .split("_")
        .map { |e| e.capitalize }
        .join

      if lowercase
        result[0, 1].downcase + result[1..-1]
      else
        result
      end
    end
387332
function(property, camelCase) {
		var prefixed = self.prefix + property;

		return camelCase? StyleFix.camelCase(prefixed) : prefixed;
	}
1352334
function(str) {
    var camelized = Ember.String.camelize(str);
    return camelized.charAt(0).toUpperCase() + camelized.substr(1);
  }