Skip to content

generate

Generates a file at the specified path with the provided lines of code.

Import:

import { generate } from 'obsidian-dev-utils/script-utils/code-generator';

Signature:

function generate(path: string, lines: string[]): Promise<void>

Parameters:

ParameterTypeDescription
pathstringThe path where the file will be generated.
linesstring[]An array of strings representing the lines of code to be written in the file.

Returns: Promise<void> — A Promise that resolves when the file generation is complete.