Files
Marcel Arndt a2ad5f5c6d import vault
2026-07-16 14:04:45 +02:00

13 lines
286 B
JavaScript

module.exports = function(prop_name) {
let max = -1;
for (const f of app.vault.getMarkdownFiles()) {
const fm = app.metadataCache.getFileCache(f)?.frontmatter;
if(typeof fm?.[prop_name] === "number") {
max = Math.max(max, fm[prop_name])
}
}
return max + 1
}