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

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