MCPcopy Create free account
hub / github.com/codecombat/codecombat / titleize

Function titleize

app/core/utils.js:219–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217const countryNameToCode = country => __guard__(_.find(countries, { country: (country != null ? country.toLowerCase() : undefined) }), x1 => x1.countryCode)
218
219var titleize = s => // Turns things like 'dungeons-of-kithgard' into 'Dungeons of Kithgard'
220 _.string.titleize(_.string.humanize(s)).replace(
221 / (and|or|but|nor|yet|so|for|a|an|the|in|to|of|at|by|up|for|off|on|with|from)(?= )/ig,
222 word => word.toLowerCase(),
223 )
224
225const OZ_COURSE_IDS_MAP = {
226 CHAPTER_ONE: '5d41d731a8d1836b5aa3cba1',

Callers 1

countryCodeToNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected