UNPKG

syllabusobject

Version:

A deterministic builder for static syllabus structures with filename-safe output.

8 lines (6 loc) 221 B
// utils/sortManager.js export function getNextSortOrder(list) { if (!Array.isArray(list) || list.length === 0) return 1; const max = Math.max(...list.map(item => item.sortOrder || 0)); return max + 1; }