0.1.5 • Published 1 year ago

obsidian-extra v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

obsidian-extra

support Obsidian versions total downloads

Utilities for working with Obsidian's undocumented API in a version-agnostic manner.

Installation

Use npm or yarn to install type definitions for undocumented Obsidian APIs:

npm install obsidian-extra

Usage

Import the desired function(s) and use them!

import { getEnabledPluginIDs, getPluginInstance } from "obsidian-extra";

// Inside your Plugin class:
const enabledPluginInstances = getEnabledPluginIDs(this.app)
	.map((id) => getPluginInstance(this.app, id));

Certain functions are deemed "unsafe", as they have the ability to easily break Obsidian or interfere with the operation of other plugins. These functions are only available in the obsidian-extra/unsafe import.

Design Goals

  • Tree-shakeable.
    Using functions from obsidian-extra should only bring in exactly what they need.

  • Safety first.
    Functions should not have the ability to break Obsidian just by themselves, unless exported through the "unsafe" import.

  • Simple abstraction.
    No complicated classes and designs. A function does exactly what you need, only abstracting away the parts that could be accidentally misused.

Features

Workspace

Plugins

Settings

CSS

Custom CSS

View Registry

Platform

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.0

1 year ago