MCPcopy Create free account
hub / github.com/chhoumann/MetaEdit / assertWritableKey

Method assertWritableKey

src/bulk/bulkMetadataEditor.ts:279–283  ·  view source on GitHub ↗

* Throw if `key` is a reserved object-machinery name that cannot be written as * a frontmatter property (see `isReservedFrontmatterKey`). Centralizes the * refusal so the public `apply` boundary and the `applyToFile` write boundary * reject identically.

(key: string)

Source from the content-addressed store, hash-verified

277 * reject identically.
278 */
279 private assertWritableKey(key: string): void {
280 if (isReservedFrontmatterKey(key)) {
281 throw new Error(`"${key}" is a reserved property name and cannot be written to frontmatter.`);
282 }
283 }
284
285 private wrapInArrayFor(key: string): boolean {
286 const { mode, properties } = this.plugin.settings.EditMode;

Callers 2

applyMethod · 0.95
applyToFileMethod · 0.95

Calls 1

isReservedFrontmatterKeyFunction · 0.85

Tested by

no test coverage detected