13 lines
286 B
JavaScript
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
|
|
}
|