<commit_before>var toString = require('../lang/toString')
var slugify = require('./case-slugify')
var unCamelCase = require('./case-uncamelize')

// Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case.

function hyphenate (str) {
  str = toString(str)
  str = unCamelCase(str)
  return slugify(str, '-')
}

module.exports = hyphenate
<commit_msg>update string/case-hyphenate adjust dependencies<commit_after>var stringify  = require('./stringify')
var slugify    = require('./case-slugify')
var uncamelize = require('./case-uncamelize')

// Replaces spaces with hyphens, split camelCase text,
// remove non-word chars, remove accents and convert to lower case.

function hyphenate (str) {
  return slugify(uncamelize(stringify(str)), '-')
}

module.exports = hyphenate

{'fraction_non_alphanumeric': 0.12725090036014405, 'fraction_numerical': 0.0, 'mean_word_length': 4.751724137931035, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5422348', 'n_tokens_mistral': 265, 'n_tokens_neox': 253, 'n_words': 73}