MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / normalizeStateEntry

Function normalizeStateEntry

scripts/i18n-manager.mjs:121–138  ·  view source on GitHub ↗
(entry)

Source from the content-addressed store, hash-verified

119// --- Commands ---
120
121function normalizeStateEntry(entry) {
122 if (!entry) {
123 return { source: '', translation: '' };
124 }
125
126 if (typeof entry === 'string') {
127 return { source: entry, translation: '' };
128 }
129
130 if (typeof entry === 'object') {
131 return {
132 source: entry.source ?? '',
133 translation: entry.translation ?? ''
134 };
135 }
136
137 return { source: '', translation: '' };
138}
139
140/** `sync`: Updates manifest and state files. */
141async function sync() {

Callers 4

syncFunction · 0.85
verifyFunction · 0.85
buildNestedObjectFunction · 0.85
statusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected