Skip to content

addPluginIdToCommunityPlugins

Adds a plugin id to the content of a community-plugins.json.

Import:

import { addPluginIdToCommunityPlugins } from '@mnaoumov/obsidian-dev-toolkit/device-deployment';

Signature:

function addPluginIdToCommunityPlugins(content: string, pluginId: string): string | null

Parameters:

Parameter Type Description
content string The file content, or an empty string when the file does not exist.
pluginId string The plugin id.

Returns: string | null — The new content, or null when the id is already listed.