No description
Find a file
Tiago Jacinto ac81188979 chore: migrate from pnpm to bun
- Update packageManager to bun@1.2.2
- Remove pnpm-lock.yaml
- Add bun.lock

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 14:32:13 +00:00
docs/features feat: add signifiers for inheritance errors 2025-08-13 13:18:23 +01:00
src fix: initialize file data only if it doesn't exist 2025-08-27 16:08:02 +01:00
.editorconfig chore: setup configurations and dependencies 2025-03-26 17:17:03 +00:00
.gitignore feat: implement main features 2025-04-10 12:00:01 +01:00
.npmrc feat: implement main features 2025-04-10 12:00:01 +01:00
biome.jsonc chore: swap prettier with biome for linting 2025-08-13 13:18:42 +01:00
bun.lock chore: migrate from pnpm to bun 2026-03-09 14:32:13 +00:00
esbuild.config.mjs chore: setup configurations and dependencies 2025-03-26 17:17:03 +00:00
eslint.config.mjs chore: disable perfectionist config 2025-04-02 15:32:34 +01:00
global.d.ts feat: guarantee that when getting file data that data is initialized if not already 2025-08-27 15:34:30 +01:00
LICENSE Create LICENSE 2025-05-27 15:03:38 +01:00
manifest.json fix: initialize file data only if it doesn't exist 2025-08-27 16:08:02 +01:00
package.json chore: migrate from pnpm to bun 2026-03-09 14:32:13 +00:00
README.md feat: guarantee that when getting file data that data is initialized if not already 2025-08-27 15:34:30 +01:00
styles.css feat: add inheritance errors ui 2025-08-14 12:54:49 +01:00
tsconfig.json feat: add inheritance errors ui 2025-08-14 12:54:49 +01:00
version-bump.mjs Initial commit 2025-03-17 11:23:05 +00:00
versions.json chore: remove not usable versions 2025-08-27 16:12:11 +01:00

Object Oriented Thinking

Add inheritance-like behavior to notes.

Usage

1. Extend

In a note's frontmatter, add the property (default: extends) with a link to the parent note:

---
extends: [[ParentNote]]
---

2. Query

Using utility methods: getObjectFileByPath(path).isDescendantOf(parentObjectFile)

Methods

Examples
const taskObjectFile = oot.getObjectFileByLink("[[Task]]")

dv.table(["File"], dv.pages().where(page => {
  const pageObjectFile = oot.getObjectFileByPath(page.file.path)

  return pageObjectFile?.isDescendantOf(taskObjectFile)
}).map(p => [p.file.link]))

oot.getObjectFileByPath(path: string): TFile & {isDescendantOf: (parentFile: TFile) => boolean} | null

Examples
const currentObjectFile = oot.getObjectFileByPath(dv.current().file.path);

dv.table(
	['File'],
	dv
		.pages()
		.where((page) => {
			const pageObjectFile = oot.getObjectFileByPath(page.file.path);

			return pageObjectFile?.isDescendantOf(currentObjectFile);
		})
		.map((p) => [p.file.link]),
);

Defining your own functions

You can define your own functions like this or use javascript loader plugins like CustomJS:

const isDescendantOf = (parentObjectFile) => (page) => oot.getObjectFileByPath(page.file.path)?.isDescendantOf(parentObjectFile) ?? false

const taskObjectFile = oot.getObjectFileByLink("[[Inbox/Task|Task]]")

dv.table(["File"], dv.pages().where(isDescendantOf(taskObjectFile)).map(p => [p.file.link]))

Manually installing the plugin

  • Copy over main.js, styles.css, manifest.json to your vault VaultFolder/.obsidian/plugins/your-plugin-id/.