has

View as MarkdownOpen in Claude

Check whether a dot-notation path exists in the loaded configuration.

Parameters

path
stringRequired

Dot-separated key path to check (e.g., "server.port").

Returns

booleantrue if the path resolves to a defined value.

Example

1import { ConfigLoader } from '@signalwire/sdk';
2
3const config = new ConfigLoader('./config.json');
4
5if (config.has('security.ssl_enabled')) {
6 console.log('SSL setting found');
7}