import vault
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user