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

Function getCorrectName

app/core/utils.js:41–49  ·  view source on GitHub ↗
(session)

Source from the content-addressed store, hash-verified

39}
40
41const getCorrectName = function (session) {
42 if (session.fullName) { // already handle anonymize in server side
43 return session.fullName.replace(/^Anonymous/, $.i18n.t('general.player'))
44 } else if (session.get('fullName')) {
45 return session.get('fullName').replace(/^Anonymous/, $.i18n.t('general.player'))
46 } else {
47 return session.creatorName || session.get('creatorName') || $.i18n.t('play.anonymous')
48 }
49}
50
51const getAnonymizationStatus = function (league, supermodel) {
52 if (!league || !features.enableAnonymization) {

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected