hasSection

View as MarkdownOpen in Claude

Check whether a POM section with the given title exists.

Parameters

title
stringRequired

The section heading to look for.

Returns

booleantrue if the section exists.

Example

import { PromptManager } from '@signalwire/sdk';
const pm = new PromptManager();
pm.addSection('Role', { body: 'You are a support agent.' });
console.log(pm.hasSection('Role')); // true
console.log(pm.hasSection('Rules')); // false