MCPcopy Index your code
hub / github.com/massCodeIO/massCode / sanitizeContentSort

Function sanitizeContentSort

src/main/store/module/app.ts:334–346  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

332}
333
334function sanitizeContentSort(value: unknown): ContentSortState {
335 const source = asRecord(value)
336
337 return {
338 sort: readEnum(
339 source,
340 'sort',
341 ['createdAt', 'updatedAt', 'name'] as const,
342 'createdAt',
343 ),
344 order: readEnum(source, 'order', ['ASC', 'DESC'] as const, 'DESC'),
345 }
346}
347
348function sanitizeCommandPaletteRecent(
349 value: unknown,

Callers 1

sanitizeAppStoreFunction · 0.85

Calls 2

asRecordFunction · 0.90
readEnumFunction · 0.90

Tested by

no test coverage detected