-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document readConfig function (#3230)
* Update getConfig.md * Create readConfig.md * Update getConfig.md * Update readConfig.md Co-authored-by: MartianTribe <steve@martiantribe.com>
- Loading branch information
1 parent
f0e8f78
commit 424c82b
Showing
2 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
layout: api_prebidjs | ||
title: pbjs.readConfig([string]) | ||
description: | ||
--- | ||
|
||
|
||
The `readConfig` function is used for retrieving the current configuration object or subscribing to configuration updates. When called with no parameters, the entire config object is returned. When called with a string parameter, a single configuration property matching that parameter is returned. The readConfig function has been introduced for safer use of the getConfig functionality, as it returns a clone. | ||
|
||
{% highlight js %} | ||
/* Get config object */ | ||
config.readConfig() | ||
|
||
/* Get debug config */ | ||
config.readConfig('debug') | ||
{% endhighlight %} | ||
|
||
<hr class="full-rule" /> |