MCPcopy Create free account
hub / github.com/DavidWells/analytics / formatName

Function formatName

scripts/docs.js:767–786  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

765// const anyKeyExists = (object, keys) => Object.keys(object).some((key) => keys.includes(key))
766
767function formatName(name) {
768 const prefix = 'analytics'
769 if (storageKeys.includes(name)) {
770 return `${prefix}.storage.${name}`
771 }
772 if (storageKeys.includes(name)) {
773 return `${prefix}.storage.${name}`
774 }
775 if (PLUGIN_KEYS.includes(name)) {
776 const postFix = (name === 'plugins') ? '' : `.${name}`
777 return `${prefix}.plugins${postFix}`
778 }
779 if (constantKeys.includes(name)) {
780 return `${name}`
781 }
782 if (name === prefix) {
783 return 'Configuration'
784 }
785 return `${prefix}.${name}`
786}
787
788function formatExample(tags) {
789 return tags.filter((tag) => {

Callers 1

API_DOCSFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected