prebid.js 6.0.0 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc.js +1 -7
- package/.circleci/config.yml +1 -1
- package/README.md +1 -1
- package/browsers.json +13 -29
- package/gulpfile.js +88 -82
- package/integrationExamples/gpt/weboramaRtdProvider_example.html +23 -14
- package/karma.conf.maker.js +2 -2
- package/modules/33acrossBidAdapter.js +189 -102
- package/modules/adagioBidAdapter.js +1 -1
- package/modules/addefendBidAdapter.js +1 -0
- package/modules/adheseBidAdapter.js +7 -2
- package/modules/adkernelBidAdapter.js +147 -61
- package/modules/adlivetechBidAdapter.md +61 -0
- package/modules/adlooxAdServerVideo.js +2 -2
- package/modules/adlooxAnalyticsAdapter.js +4 -4
- package/modules/admanBidAdapter.js +1 -0
- package/modules/admixerBidAdapter.js +3 -2
- package/modules/adnuntiusBidAdapter.js +5 -2
- package/modules/adomikAnalyticsAdapter.js +16 -4
- package/modules/adplusBidAdapter.js +203 -0
- package/modules/adplusBidAdapter.md +39 -0
- package/modules/adxcgBidAdapter.js +311 -359
- package/modules/adxcgBidAdapter.md +22 -21
- package/modules/adyoulikeBidAdapter.js +7 -2
- package/modules/aniviewBidAdapter.js +1 -1
- package/modules/appnexusBidAdapter.js +23 -3
- package/modules/beachfrontBidAdapter.js +14 -17
- package/modules/beopBidAdapter.js +6 -4
- package/modules/bidViewability.js +3 -3
- package/modules/bidViewabilityIO.js +3 -3
- package/modules/codefuelBidAdapter.js +1 -3
- package/modules/codefuelBidAdapter.md +3 -3
- package/modules/colossussspBidAdapter.js +7 -0
- package/modules/compassBidAdapter.js +201 -0
- package/modules/compassBidAdapter.md +79 -0
- package/modules/craftBidAdapter.js +5 -3
- package/modules/criteoBidAdapter.js +1 -1
- package/modules/currency.js +2 -2
- package/modules/cwireBidAdapter.js +3 -0
- package/modules/dailyhuntBidAdapter.js +435 -0
- package/modules/dailyhuntBidAdapter.md +4 -0
- package/modules/datablocksBidAdapter.js +3 -3
- package/modules/dchain.js +149 -0
- package/modules/dchain.md +45 -0
- package/modules/deepintentBidAdapter.js +1 -1
- package/modules/dspxBidAdapter.js +1 -1
- package/modules/emx_digitalBidAdapter.js +9 -1
- package/modules/engageyaBidAdapter.js +68 -54
- package/modules/feedadBidAdapter.js +2 -2
- package/modules/feedadBidAdapter.md +4 -2
- package/modules/freewheel-sspBidAdapter.js +6 -0
- package/modules/futureads.md +48 -0
- package/modules/glimpseBidAdapter.js +44 -16
- package/modules/goldbachBidAdapter.js +1176 -0
- package/modules/goldbachBidAdapter.md +151 -0
- package/modules/gptPreAuction.js +11 -5
- package/modules/gridBidAdapter.js +5 -4
- package/modules/gumgumBidAdapter.js +7 -3
- package/modules/id5IdSystem.md +6 -6
- package/modules/imRtdProvider.js +31 -0
- package/modules/improvedigitalBidAdapter.js +19 -3
- package/modules/instreamTracking.js +4 -4
- package/modules/intersectionRtdProvider.js +114 -0
- package/modules/invibesBidAdapter.js +64 -14
- package/modules/invibesBidAdapter.md +2 -1
- package/modules/ipromBidAdapter.js +79 -0
- package/modules/ixBidAdapter.js +185 -22
- package/modules/kinessoIdSystem.js +1 -1
- package/modules/limelightDigitalBidAdapter.js +2 -1
- package/modules/livewrappedBidAdapter.js +8 -2
- package/modules/lotamePanoramaIdSystem.js +80 -8
- package/modules/luponmediaBidAdapter.js +570 -0
- package/modules/mediasquareBidAdapter.js +1 -9
- package/modules/merkleIdSystem.js +5 -0
- package/modules/missenaBidAdapter.js +89 -0
- package/modules/nativoBidAdapter.js +27 -1
- package/modules/nextMillenniumBidAdapter.js +37 -7
- package/modules/oguryBidAdapter.js +2 -1
- package/modules/openxBidAdapter.js +6 -1
- package/modules/prebidServerBidAdapter/index.js +19 -15
- package/modules/pubgeniusBidAdapter.js +1 -1
- package/modules/pubmaticBidAdapter.js +5 -3
- package/modules/pubxaiAnalyticsAdapter.js +17 -0
- package/modules/relaidoBidAdapter.js +86 -65
- package/modules/richaudienceBidAdapter.js +2 -3
- package/modules/rtdModule/index.js +48 -18
- package/modules/rubiconBidAdapter.js +31 -19
- package/modules/saambaaBidAdapter.js +420 -0
- package/modules/saambaaBidAdapter.md +65 -68
- package/modules/seedtagBidAdapter.js +6 -0
- package/modules/sharedIdSystem.js +27 -1
- package/modules/smaatoBidAdapter.js +9 -1
- package/modules/smartxBidAdapter.js +17 -1
- package/modules/sspBCBidAdapter.js +34 -3
- package/modules/tappxBidAdapter.js +3 -1
- package/modules/targetVideoBidAdapter.js +187 -0
- package/modules/targetVideoBidAdapter.md +34 -0
- package/modules/telariaBidAdapter.js +2 -2
- package/modules/trustxBidAdapter.js +18 -17
- package/modules/undertoneBidAdapter.js +8 -1
- package/modules/userId/index.js +27 -2
- package/modules/ventes.md +71 -0
- package/modules/ventesBidAdapter.js +104 -64
- package/modules/ventesBidAdapter.md +0 -1
- package/modules/vidoomyBidAdapter.js +65 -108
- package/modules/visxBidAdapter.js +20 -3
- package/modules/visxBidAdapter.md +4 -6
- package/modules/weboramaRtdProvider.js +288 -73
- package/modules/weboramaRtdProvider.md +27 -10
- package/modules/yahoosspBidAdapter.js +5 -1
- package/modules/yahoosspBidAdapter.md +1 -1
- package/modules/yieldlabBidAdapter.js +41 -10
- package/modules/yieldlabBidAdapter.md +91 -48
- package/modules/yieldoneBidAdapter.js +115 -11
- package/modules/zetaSspBidAdapter.md +33 -1
- package/modules/zeta_global_sspBidAdapter.js +22 -1
- package/package.json +6 -1
- package/plugins/pbjsGlobals.js +28 -1
- package/src/adapterManager.js +14 -8
- package/src/auction.js +5 -4
- package/src/prebid.js +1 -2
- package/src/targeting.js +24 -3
- package/src/utils.js +41 -7
- package/test/helpers/prebidGlobal.js +1 -0
- package/test/spec/integration/faker/googletag.js +6 -0
- package/test/spec/modules/33acrossBidAdapter_spec.js +300 -78
- package/test/spec/modules/adheseBidAdapter_spec.js +27 -1
- package/test/spec/modules/adlooxAnalyticsAdapter_spec.js +6 -6
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +35 -0
- package/test/spec/modules/adomikAnalyticsAdapter_spec.js +9 -1
- package/test/spec/modules/adplusBidAdapter_spec.js +213 -0
- package/test/spec/modules/adxcgBidAdapter_spec.js +820 -571
- package/test/spec/modules/adyoulikeBidAdapter_spec.js +26 -0
- package/test/spec/modules/appnexusBidAdapter_spec.js +63 -1
- package/test/spec/modules/beachfrontBidAdapter_spec.js +65 -1
- package/test/spec/modules/beopBidAdapter_spec.js +1 -1
- package/test/spec/modules/bidViewabilityIO_spec.js +2 -2
- package/test/spec/modules/bidViewability_spec.js +4 -4
- package/test/spec/modules/codefuelBidAdapter_spec.js +1 -1
- package/test/spec/modules/colossussspBidAdapter_spec.js +9 -0
- package/test/spec/modules/compassBidAdapter_spec.js +397 -0
- package/test/spec/modules/cwireBidAdapter_spec.js +10 -8
- package/test/spec/modules/dailyhuntBidAdapter_spec.js +404 -0
- package/test/spec/modules/datablocksBidAdapter_spec.js +3 -3
- package/test/spec/modules/dchain_spec.js +329 -0
- package/test/spec/modules/emx_digitalBidAdapter_spec.js +10 -0
- package/test/spec/modules/engageyaBidAdapter_spec.js +231 -95
- package/test/spec/modules/eplanningBidAdapter_spec.js +8 -8
- package/test/spec/modules/feedadBidAdapter_spec.js +15 -0
- package/test/spec/modules/freewheel-sspBidAdapter_spec.js +19 -0
- package/test/spec/modules/glimpseBidAdapter_spec.js +33 -0
- package/test/spec/modules/goldbachBidAdapter_spec.js +1359 -0
- package/test/spec/modules/gptPreAuction_spec.js +58 -4
- package/test/spec/modules/gumgumBidAdapter_spec.js +6 -0
- package/test/spec/modules/imRtdProvider_spec.js +25 -0
- package/test/spec/modules/improvedigitalBidAdapter_spec.js +3 -1
- package/test/spec/modules/intersectionRtdProvider_spec.js +141 -0
- package/test/spec/modules/invibesBidAdapter_spec.js +148 -4
- package/test/spec/modules/ipromBidAdapter_spec.js +195 -0
- package/test/spec/modules/ixBidAdapter_spec.js +293 -2
- package/test/spec/modules/konduitWrapper_spec.js +0 -1
- package/test/spec/modules/limelightDigitalBidAdapter_spec.js +10 -7
- package/test/spec/modules/livewrappedBidAdapter_spec.js +31 -0
- package/test/spec/modules/lotamePanoramaIdSystem_spec.js +227 -0
- package/test/spec/modules/luponmediaBidAdapter_spec.js +412 -0
- package/test/spec/modules/mediasquareBidAdapter_spec.js +4 -4
- package/test/spec/modules/merkleIdSystem_spec.js +18 -0
- package/test/spec/modules/missenaBidAdapter_spec.js +134 -0
- package/test/spec/modules/nativoBidAdapter_spec.js +35 -18
- package/test/spec/modules/nextMillenniumBidAdapter_spec.js +26 -1
- package/test/spec/modules/oguryBidAdapter_spec.js +13 -11
- package/test/spec/modules/openxBidAdapter_spec.js +5 -0
- package/test/spec/modules/prebidServerBidAdapter_spec.js +62 -2
- package/test/spec/modules/pubgeniusBidAdapter_spec.js +3 -3
- package/test/spec/modules/pubmaticBidAdapter_spec.js +1 -1
- package/test/spec/modules/pubxaiAnalyticsAdapter_spec.js +11 -0
- package/test/spec/modules/realTimeDataModule_spec.js +135 -49
- package/test/spec/modules/relaidoBidAdapter_spec.js +71 -63
- package/test/spec/modules/richaudienceBidAdapter_spec.js +2 -2
- package/test/spec/modules/rubiconBidAdapter_spec.js +65 -9
- package/test/spec/modules/seedtagBidAdapter_spec.js +3 -0
- package/test/spec/modules/sharedIdSystem_spec.js +52 -6
- package/test/spec/modules/smaatoBidAdapter_spec.js +61 -0
- package/test/spec/modules/smartxBidAdapter_spec.js +9 -0
- package/test/spec/modules/sspBCBidAdapter_spec.js +33 -3
- package/test/spec/modules/tappxBidAdapter_spec.js +4 -0
- package/test/spec/modules/targetVideoBidAdapter_spec.js +96 -0
- package/test/spec/modules/trustxBidAdapter_spec.js +42 -0
- package/test/spec/modules/userId_spec.js +51 -0
- package/test/spec/modules/vidoomyBidAdapter_spec.js +32 -13
- package/test/spec/modules/visxBidAdapter_spec.js +121 -5
- package/test/spec/modules/weboramaRtdProvider_spec.js +408 -214
- package/test/spec/modules/yahoosspBidAdapter_spec.js +28 -1
- package/test/spec/modules/yieldlabBidAdapter_spec.js +81 -0
- package/test/spec/modules/yieldoneBidAdapter_spec.js +299 -53
- package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +33 -1
- package/test/spec/unit/core/adapterManager_spec.js +24 -6
- package/test/spec/unit/core/targeting_spec.js +116 -0
- package/test/spec/utils_spec.js +38 -0
- package/test/test_deps.js +3 -0
- package/test/test_index.js +1 -3
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import includes from 'core-js-pure/features/array/includes.js';
|
|
2
|
+
import { config } from '../src/config.js';
|
|
3
|
+
import { getHook } from '../src/hook.js';
|
|
4
|
+
import { _each, isStr, isArray, isPlainObject, hasOwn, deepClone, deepAccess, logWarn, logError } from '../src/utils.js';
|
|
5
|
+
|
|
6
|
+
const shouldBeAString = ' should be a string';
|
|
7
|
+
const shouldBeAnObject = ' should be an object';
|
|
8
|
+
const shouldBeAnArray = ' should be an Array';
|
|
9
|
+
const shouldBeValid = ' is not a valid dchain property';
|
|
10
|
+
const MODE = {
|
|
11
|
+
STRICT: 'strict',
|
|
12
|
+
RELAXED: 'relaxed',
|
|
13
|
+
OFF: 'off'
|
|
14
|
+
};
|
|
15
|
+
const MODES = []; // an array of modes
|
|
16
|
+
_each(MODE, mode => MODES.push(mode));
|
|
17
|
+
|
|
18
|
+
export function checkDchainSyntax(bid, mode) {
|
|
19
|
+
let dchainObj = deepClone(bid.meta.dchain);
|
|
20
|
+
let failPrefix = 'Detected something wrong in bid.meta.dchain object for bid:';
|
|
21
|
+
let failMsg = '';
|
|
22
|
+
const dchainPropList = ['ver', 'complete', 'nodes', 'ext'];
|
|
23
|
+
|
|
24
|
+
function appendFailMsg(msg) {
|
|
25
|
+
failMsg += '\n' + msg;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function printFailMsg() {
|
|
29
|
+
if (mode === MODE.STRICT) {
|
|
30
|
+
logError(failPrefix, bid, '\n', dchainObj, failMsg);
|
|
31
|
+
} else {
|
|
32
|
+
logWarn(failPrefix, bid, `\n`, dchainObj, failMsg);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
let dchainProps = Object.keys(dchainObj);
|
|
37
|
+
dchainProps.forEach(prop => {
|
|
38
|
+
if (!includes(dchainPropList, prop)) {
|
|
39
|
+
appendFailMsg(`dchain.${prop}` + shouldBeValid);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
if (dchainObj.complete !== 0 && dchainObj.complete !== 1) {
|
|
44
|
+
appendFailMsg(`dchain.complete should be 0 or 1`);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (!isStr(dchainObj.ver)) {
|
|
48
|
+
appendFailMsg(`dchain.ver` + shouldBeAString);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (hasOwn(dchainObj, 'ext')) {
|
|
52
|
+
if (!isPlainObject(dchainObj.ext)) {
|
|
53
|
+
appendFailMsg(`dchain.ext` + shouldBeAnObject);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (!isArray(dchainObj.nodes)) {
|
|
58
|
+
appendFailMsg(`dchain.nodes` + shouldBeAnArray);
|
|
59
|
+
printFailMsg();
|
|
60
|
+
if (mode === MODE.STRICT) return false;
|
|
61
|
+
} else {
|
|
62
|
+
const nodesPropList = ['asi', 'bsid', 'rid', 'name', 'domain', 'ext'];
|
|
63
|
+
dchainObj.nodes.forEach((node, index) => {
|
|
64
|
+
if (!isPlainObject(node)) {
|
|
65
|
+
appendFailMsg(`dchain.nodes[${index}]` + shouldBeAnObject);
|
|
66
|
+
} else {
|
|
67
|
+
let nodeProps = Object.keys(node);
|
|
68
|
+
nodeProps.forEach(prop => {
|
|
69
|
+
if (!includes(nodesPropList, prop)) {
|
|
70
|
+
appendFailMsg(`dchain.nodes[${index}].${prop}` + shouldBeValid);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (prop === 'ext') {
|
|
74
|
+
if (!isPlainObject(node.ext)) {
|
|
75
|
+
appendFailMsg(`dchain.nodes[${index}].ext` + shouldBeAnObject);
|
|
76
|
+
}
|
|
77
|
+
} else {
|
|
78
|
+
if (!isStr(node[prop])) {
|
|
79
|
+
appendFailMsg(`dchain.nodes[${index}].${prop}` + shouldBeAString);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (failMsg.length > 0) {
|
|
88
|
+
printFailMsg();
|
|
89
|
+
if (mode === MODE.STRICT) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function isValidDchain(bid) {
|
|
97
|
+
let mode = MODE.STRICT;
|
|
98
|
+
const dchainConfig = config.getConfig('dchain');
|
|
99
|
+
|
|
100
|
+
if (dchainConfig && isStr(dchainConfig.validation) && MODES.indexOf(dchainConfig.validation) != -1) {
|
|
101
|
+
mode = dchainConfig.validation;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (mode === MODE.OFF) {
|
|
105
|
+
return true;
|
|
106
|
+
} else {
|
|
107
|
+
return checkDchainSyntax(bid, mode);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function addBidResponseHook(fn, adUnitCode, bid) {
|
|
112
|
+
const basicDchain = {
|
|
113
|
+
ver: '1.0',
|
|
114
|
+
complete: 0,
|
|
115
|
+
nodes: []
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
if (deepAccess(bid, 'meta.networkId') && deepAccess(bid, 'meta.networkName')) {
|
|
119
|
+
basicDchain.nodes.push({ name: bid.meta.networkName, bsid: bid.meta.networkId.toString() });
|
|
120
|
+
}
|
|
121
|
+
basicDchain.nodes.push({ name: bid.bidderCode });
|
|
122
|
+
|
|
123
|
+
let bidDchain = deepAccess(bid, 'meta.dchain');
|
|
124
|
+
if (bidDchain && isPlainObject(bidDchain)) {
|
|
125
|
+
let result = isValidDchain(bid);
|
|
126
|
+
|
|
127
|
+
if (result) {
|
|
128
|
+
// extra check in-case mode is OFF and there is a setup issue
|
|
129
|
+
if (isArray(bidDchain.nodes)) {
|
|
130
|
+
bid.meta.dchain.nodes.push({ asi: bid.bidderCode });
|
|
131
|
+
} else {
|
|
132
|
+
logWarn('bid.meta.dchain.nodes did not exist or was not an array; did not append prebid dchain.', bid);
|
|
133
|
+
}
|
|
134
|
+
} else {
|
|
135
|
+
// remove invalid dchain
|
|
136
|
+
delete bid.meta.dchain;
|
|
137
|
+
}
|
|
138
|
+
} else {
|
|
139
|
+
bid.meta.dchain = basicDchain;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
fn(adUnitCode, bid);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function init() {
|
|
146
|
+
getHook('addBidResponse').before(addBidResponseHook, 35);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
init();
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# dchain module
|
|
2
|
+
|
|
3
|
+
Refer:
|
|
4
|
+
- https://iabtechlab.com/buyers-json-demand-chain/
|
|
5
|
+
|
|
6
|
+
## Sample code for dchain setConfig and dchain object
|
|
7
|
+
```
|
|
8
|
+
pbjs.setConfig({
|
|
9
|
+
"dchain": {
|
|
10
|
+
"validation": "strict"
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
bid.meta.dchain: {
|
|
17
|
+
"complete": 0,
|
|
18
|
+
"ver": "1.0",
|
|
19
|
+
"ext": {...},
|
|
20
|
+
"nodes": [{
|
|
21
|
+
"asi": "abc",
|
|
22
|
+
"bsid": "123",
|
|
23
|
+
"rid": "d4e5f6",
|
|
24
|
+
"name": "xyz",
|
|
25
|
+
"domain": "mno",
|
|
26
|
+
"ext": {...}
|
|
27
|
+
}, ...]
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Workflow
|
|
32
|
+
The dchain module is not enabled by default as it may not be necessary for all publishers.
|
|
33
|
+
If required, dchain module can be included as following
|
|
34
|
+
```
|
|
35
|
+
$ gulp build --modules=dchain,pubmaticBidAdapter,openxBidAdapter,rubiconBidAdapter,sovrnBidAdapter
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The dchain module will validate a bidder's dchain object (if it was defined). Bidders should assign their dchain object into `bid.meta` field. If the dchain object is valid, it will remain in the bid object for later use.
|
|
39
|
+
|
|
40
|
+
If it was not defined, the dchain will create a default dchain object for prebid.
|
|
41
|
+
|
|
42
|
+
## Validation modes
|
|
43
|
+
- ```strict```: It is the default validation mode. In this mode, dchain object will not be accpeted from adapters if it is invalid. Errors are thrown for invalid dchain object.
|
|
44
|
+
- ```relaxed```: In this mode, errors are thrown for an invalid dchain object but the invalid dchain object is still accepted from adapters.
|
|
45
|
+
- ```off```: In this mode, no validations are performed and dchain object is accepted as is from adapters.
|
|
@@ -162,7 +162,7 @@ function buildImpression(bid) {
|
|
|
162
162
|
impression = {
|
|
163
163
|
id: bid.bidId,
|
|
164
164
|
tagid: bid.params.tagId || '',
|
|
165
|
-
secure: window.location.protocol === 'https' ? 1 : 0,
|
|
165
|
+
secure: window.location.protocol === 'https:' ? 1 : 0,
|
|
166
166
|
displaymanager: 'di_prebid',
|
|
167
167
|
displaymanagerver: DI_M_V,
|
|
168
168
|
ext: buildCustomParams(bid)
|
|
@@ -257,10 +257,18 @@ export const spec = {
|
|
|
257
257
|
tagid,
|
|
258
258
|
secure
|
|
259
259
|
};
|
|
260
|
+
|
|
261
|
+
// adding gpid support
|
|
262
|
+
let gpid = deepAccess(bid, 'ortb2Imp.ext.data.adserver.adslot');
|
|
263
|
+
if (!gpid) {
|
|
264
|
+
gpid = deepAccess(bid, 'ortb2Imp.ext.data.pbadslot');
|
|
265
|
+
}
|
|
266
|
+
if (gpid) {
|
|
267
|
+
data.ext = {gpid: gpid.toString()};
|
|
268
|
+
}
|
|
260
269
|
let typeSpecifics = isVideo ? { video: emxAdapter.buildVideo(bid) } : { banner: emxAdapter.buildBanner(bid) };
|
|
261
270
|
let bidfloorObj = bidfloor > 0 ? { bidfloor, bidfloorcur: DEFAULT_CUR } : {};
|
|
262
271
|
let emxBid = Object.assign(data, typeSpecifics, bidfloorObj);
|
|
263
|
-
|
|
264
272
|
emxImps.push(emxBid);
|
|
265
273
|
});
|
|
266
274
|
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BANNER,
|
|
3
|
-
NATIVE
|
|
4
|
-
} from '../src/mediaTypes.js';
|
|
1
|
+
import { BANNER, NATIVE } from '../src/mediaTypes.js';
|
|
5
2
|
import { createTrackPixelHtml } from '../src/utils.js';
|
|
6
3
|
|
|
7
4
|
const {
|
|
@@ -10,14 +7,21 @@ const {
|
|
|
10
7
|
const BIDDER_CODE = 'engageya';
|
|
11
8
|
const ENDPOINT_URL = 'https://recs.engageya.com/rec-api/getrecs.json';
|
|
12
9
|
const ENDPOINT_METHOD = 'GET';
|
|
10
|
+
const SUPPORTED_SIZES = [
|
|
11
|
+
[100, 75], [236, 202], [100, 100], [130, 130], [200, 200], [250, 250], [300, 272], [300, 250], [300, 230], [300, 214], [300, 187], [300, 166], [300, 150], [300, 133], [300, 120], [400, 200], [300, 200], [250, 377], [620, 410], [207, 311], [310, 166], [310, 333], [190, 106], [228, 132], [300, 174], [80, 60], [600, 500], [600, 600], [1080, 610], [1080, 610], [624, 350], [650, 1168], [1080, 1920], [300, 374], [336, 280]
|
|
12
|
+
];
|
|
13
13
|
|
|
14
|
-
function getPageUrl() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
pUrl = document.referrer ? document.referrer : pUrl;
|
|
14
|
+
function getPageUrl(bidRequest, bidderRequest) {
|
|
15
|
+
if (bidRequest.params.pageUrl && bidRequest.params.pageUrl != '[PAGE_URL]') {
|
|
16
|
+
return bidRequest.params.pageUrl;
|
|
18
17
|
}
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
if (bidderRequest && bidderRequest.refererInfo && bidderRequest.refererInfo.referer) {
|
|
19
|
+
return bidderRequest.refererInfo.referer;
|
|
20
|
+
}
|
|
21
|
+
const pageUrl = (isInIframe() && document.referrer)
|
|
22
|
+
? document.referrer
|
|
23
|
+
: window.location.href;
|
|
24
|
+
return encodeURIComponent(pageUrl);
|
|
21
25
|
}
|
|
22
26
|
|
|
23
27
|
function isInIframe() {
|
|
@@ -33,13 +37,14 @@ function getImageSrc(rec) {
|
|
|
33
37
|
return rec.thumbnail_path.indexOf('http') === -1 ? 'https:' + rec.thumbnail_path : rec.thumbnail_path;
|
|
34
38
|
}
|
|
35
39
|
|
|
36
|
-
function getImpressionTrackers(rec) {
|
|
40
|
+
function getImpressionTrackers(rec, response) {
|
|
41
|
+
const responseTrackers = [response.viewPxl];
|
|
37
42
|
if (!rec.trackers) {
|
|
38
|
-
return
|
|
43
|
+
return responseTrackers;
|
|
39
44
|
}
|
|
40
45
|
const impressionTrackers = rec.trackers.impressionPixels || [];
|
|
41
46
|
const viewTrackers = rec.trackers.viewPixels || [];
|
|
42
|
-
return [...impressionTrackers, ...viewTrackers];
|
|
47
|
+
return [...impressionTrackers, ...viewTrackers, ...responseTrackers];
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
function parseNativeResponse(rec, response) {
|
|
@@ -56,7 +61,7 @@ function parseNativeResponse(rec, response) {
|
|
|
56
61
|
displayUrl: rec.url,
|
|
57
62
|
cta: '',
|
|
58
63
|
sponsoredBy: rec.displayName,
|
|
59
|
-
impressionTrackers: getImpressionTrackers(rec),
|
|
64
|
+
impressionTrackers: getImpressionTrackers(rec, response),
|
|
60
65
|
};
|
|
61
66
|
}
|
|
62
67
|
|
|
@@ -74,56 +79,65 @@ function parseBannerResponse(rec, response) {
|
|
|
74
79
|
}
|
|
75
80
|
const title = rec.title && rec.title.trim() ? `<div class="eng_tag_ttl" style="display: none">${rec.title}</div>` : '';
|
|
76
81
|
const displayName = rec.displayName && title ? `<div class="eng_tag_brnd" style="display: none">${rec.displayName}</div>` : '';
|
|
77
|
-
const trackers = getImpressionTrackers(rec)
|
|
82
|
+
const trackers = getImpressionTrackers(rec, response)
|
|
78
83
|
.map(createTrackPixelHtml)
|
|
79
84
|
.join('');
|
|
80
85
|
return `<html><body>${style}<div id="ENG_TAG"><a href="${rec.clickUrl}" target=_blank><img class="eng_tag_img" src="${getImageSrc(rec)}" style="width:${response.imageWidth}px;height:${response.imageHeight}px;" alt="${rec.title}"/>${displayName}${title}</a>${trackers}</div></body></html>`;
|
|
81
86
|
}
|
|
82
87
|
|
|
88
|
+
function getImageSize(bidRequest) {
|
|
89
|
+
if (bidRequest.sizes && bidRequest.sizes.length > 0) {
|
|
90
|
+
return bidRequest.sizes[0];
|
|
91
|
+
} else if (bidRequest.nativeParams && bidRequest.nativeParams.image && bidRequest.nativeParams.image.sizes) {
|
|
92
|
+
return bidRequest.nativeParams.image.sizes;
|
|
93
|
+
}
|
|
94
|
+
return [-1, -1];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function isValidSize([width, height]) {
|
|
98
|
+
if (!width || !height) {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
return SUPPORTED_SIZES.some(([supportedWidth, supportedHeight]) => supportedWidth === width && supportedHeight === height);
|
|
102
|
+
}
|
|
103
|
+
|
|
83
104
|
export const spec = {
|
|
84
105
|
code: BIDDER_CODE,
|
|
85
106
|
supportedMediaTypes: [BANNER, NATIVE],
|
|
86
|
-
|
|
87
|
-
|
|
107
|
+
|
|
108
|
+
isBidRequestValid: function (bidRequest) {
|
|
109
|
+
return bidRequest &&
|
|
110
|
+
bidRequest.params &&
|
|
111
|
+
bidRequest.params.hasOwnProperty('widgetId') &&
|
|
112
|
+
bidRequest.params.hasOwnProperty('websiteId') &&
|
|
113
|
+
!isNaN(bidRequest.params.widgetId) &&
|
|
114
|
+
!isNaN(bidRequest.params.websiteId) &&
|
|
115
|
+
isValidSize(getImageSize(bidRequest));
|
|
88
116
|
},
|
|
89
117
|
|
|
90
118
|
buildRequests: function (validBidRequests, bidderRequest) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
validBidRequests.forEach(function (bidRequest) {
|
|
94
|
-
if (bidRequest.params) {
|
|
95
|
-
var mediaType = bidRequest.hasOwnProperty('nativeParams') ? 1 : 2;
|
|
96
|
-
var imageWidth = -1;
|
|
97
|
-
var imageHeight = -1;
|
|
98
|
-
if (bidRequest.sizes && bidRequest.sizes.length > 0) {
|
|
99
|
-
imageWidth = bidRequest.sizes[0][0];
|
|
100
|
-
imageHeight = bidRequest.sizes[0][1];
|
|
101
|
-
} else if (bidRequest.nativeParams && bidRequest.nativeParams.image && bidRequest.nativeParams.image.sizes) {
|
|
102
|
-
imageWidth = bidRequest.nativeParams.image.sizes[0];
|
|
103
|
-
imageHeight = bidRequest.nativeParams.image.sizes[1];
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
var widgetId = bidRequest.params.widgetId;
|
|
107
|
-
var websiteId = bidRequest.params.websiteId;
|
|
108
|
-
var pageUrl = (bidRequest.params.pageUrl && bidRequest.params.pageUrl != '[PAGE_URL]') ? bidRequest.params.pageUrl : '';
|
|
109
|
-
if (!pageUrl) {
|
|
110
|
-
pageUrl = (bidderRequest && bidderRequest.refererInfo && bidderRequest.refererInfo.referer) ? bidderRequest.refererInfo.referer : getPageUrl();
|
|
111
|
-
}
|
|
112
|
-
var bidId = bidRequest.bidId;
|
|
113
|
-
var finalUrl = ENDPOINT_URL + '?pubid=0&webid=' + websiteId + '&wid=' + widgetId + '&url=' + pageUrl + '&ireqid=' + bidId + '&pbtpid=' + mediaType + '&imw=' + imageWidth + '&imh=' + imageHeight;
|
|
114
|
-
if (bidderRequest && bidderRequest.gdprConsent && bidderRequest.gdprApplies && bidderRequest.consentString) {
|
|
115
|
-
finalUrl += '&is_gdpr=1&gdpr_consent=' + bidderRequest.consentString;
|
|
116
|
-
}
|
|
117
|
-
bidRequests.push({
|
|
118
|
-
url: finalUrl,
|
|
119
|
-
method: ENDPOINT_METHOD,
|
|
120
|
-
data: ''
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
});
|
|
119
|
+
if (!validBidRequests) {
|
|
120
|
+
return [];
|
|
124
121
|
}
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
return validBidRequests.map(bidRequest => {
|
|
123
|
+
if (bidRequest.params) {
|
|
124
|
+
const mediaType = bidRequest.hasOwnProperty('nativeParams') ? 1 : 2;
|
|
125
|
+
const [imageWidth, imageHeight] = getImageSize(bidRequest);
|
|
126
|
+
const widgetId = bidRequest.params.widgetId;
|
|
127
|
+
const websiteId = bidRequest.params.websiteId;
|
|
128
|
+
const pageUrl = getPageUrl(bidRequest, bidderRequest);
|
|
129
|
+
const bidId = bidRequest.bidId;
|
|
130
|
+
let finalUrl = ENDPOINT_URL + '?pubid=0&webid=' + websiteId + '&wid=' + widgetId + '&url=' + pageUrl + '&ireqid=' + bidId + '&pbtpid=' + mediaType + '&imw=' + imageWidth + '&imh=' + imageHeight;
|
|
131
|
+
if (bidderRequest && bidderRequest.gdprConsent && bidderRequest.gdprApplies && bidderRequest.consentString) {
|
|
132
|
+
finalUrl += '&is_gdpr=1&gdpr_consent=' + bidderRequest.consentString;
|
|
133
|
+
}
|
|
134
|
+
return {
|
|
135
|
+
url: finalUrl,
|
|
136
|
+
method: ENDPOINT_METHOD,
|
|
137
|
+
data: ''
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
}).filter(Boolean);
|
|
127
141
|
},
|
|
128
142
|
|
|
129
143
|
interpretResponse: function (serverResponse, bidRequest) {
|
|
@@ -135,12 +149,12 @@ export const spec = {
|
|
|
135
149
|
return response.recs.map(rec => {
|
|
136
150
|
let bid = {
|
|
137
151
|
requestId: response.ireqId,
|
|
138
|
-
cpm: rec.ecpm,
|
|
139
152
|
width: response.imageWidth,
|
|
140
153
|
height: response.imageHeight,
|
|
141
154
|
creativeId: rec.postId,
|
|
155
|
+
cpm: rec.pecpm || (rec.ecpm / 100),
|
|
142
156
|
currency: 'USD',
|
|
143
|
-
netRevenue:
|
|
157
|
+
netRevenue: !!rec.pecpm,
|
|
144
158
|
ttl: 360,
|
|
145
159
|
meta: { advertiserDomains: rec.domain ? [rec.domain] : [] },
|
|
146
160
|
}
|
|
@@ -176,13 +176,13 @@ function isMediaTypesEmpty(mediaTypes) {
|
|
|
176
176
|
* @return {FeedAdApiBidRequest}
|
|
177
177
|
*/
|
|
178
178
|
function createApiBidRParams(request) {
|
|
179
|
-
return {
|
|
179
|
+
return Object.assign({}, request.params, {
|
|
180
180
|
ad_type: 0,
|
|
181
181
|
client_token: request.params.clientToken,
|
|
182
182
|
placement_id: request.params.placementId,
|
|
183
183
|
sdk_version: `prebid_${VERSION}`,
|
|
184
184
|
app_hybrid: false,
|
|
185
|
-
};
|
|
185
|
+
});
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
/**
|
|
@@ -26,6 +26,7 @@ Prebid.JS adapter that connects to the FeedAd demand sources.
|
|
|
26
26
|
params: {
|
|
27
27
|
clientToken: 'your-client-token' // see below for more info
|
|
28
28
|
placementId: 'your-placement-id' // see below for more info
|
|
29
|
+
decoration: 'decoration parameters' // optional, see below for info
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
]
|
|
@@ -35,7 +36,8 @@ Prebid.JS adapter that connects to the FeedAd demand sources.
|
|
|
35
36
|
|
|
36
37
|
# Required Parameters
|
|
37
38
|
|
|
38
|
-
| Parameter
|
|
39
|
-
|
|
39
|
+
| Parameter | Description |
|
|
40
|
+
|---------------| ----------- |
|
|
40
41
|
| `clientToken` | Your FeedAd web client token. You can view your client token inside the FeedAd admin panel. |
|
|
41
42
|
| `placementId` | You can choose placement IDs yourself. A placement ID should be named after the ad position inside your product. For example, if you want to display an ad inside a list of news articles, you could name it "ad-news-overview".<br> A placement ID may consist of lowercase `a-z`, `0-9`, `-` and `_`. You do not have to manually create the placement IDs before using them. Just specify them within the code, and they will appear in the FeedAd admin panel after the first request. <br> [Learn more](/concept/feed_ad/index.html) about Placement IDs and how they are grouped to play the same Creative. |
|
|
43
|
+
| `decoration` | Optional. If you want to apply a [decoration](https://docs.feedad.com/web/feed_ad/#decorations) to the ad.
|
|
@@ -312,6 +312,12 @@ export const spec = {
|
|
|
312
312
|
requestParams._fw_us_privacy = bidderRequest.uspConsent;
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
+
// Add schain object
|
|
316
|
+
var schain = currentBidRequest.schain;
|
|
317
|
+
if (schain) {
|
|
318
|
+
requestParams.schain = schain;
|
|
319
|
+
}
|
|
320
|
+
|
|
315
321
|
var vastParams = currentBidRequest.params.vastUrlParams;
|
|
316
322
|
if (typeof vastParams === 'object') {
|
|
317
323
|
for (var key in vastParams) {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
Module Name: Future Ads Bidder Adapter
|
|
3
|
+
Module Type: Bidder Adapter
|
|
4
|
+
Maintainer: contact@futureads.io
|
|
5
|
+
# Description
|
|
6
|
+
Connects to Future Ads demand source to fetch bids.
|
|
7
|
+
Banner and Video formats are supported.
|
|
8
|
+
Please use ```futureads``` as the bidder code.
|
|
9
|
+
# Test Parameters
|
|
10
|
+
```
|
|
11
|
+
var adUnits = [
|
|
12
|
+
{
|
|
13
|
+
code: 'desktop-banner-ad-div',
|
|
14
|
+
sizes: [[300, 250]], // a display size
|
|
15
|
+
bids: [
|
|
16
|
+
{
|
|
17
|
+
bidder: "futureads",
|
|
18
|
+
params: {
|
|
19
|
+
zone: '2eb6bd58-865c-47ce-af7f-a918108c3fd2'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},{
|
|
24
|
+
code: 'mobile-banner-ad-div',
|
|
25
|
+
sizes: [[300, 50]], // a mobile size
|
|
26
|
+
bids: [
|
|
27
|
+
{
|
|
28
|
+
bidder: "futureads",
|
|
29
|
+
params: {
|
|
30
|
+
zone: '62211486-c50b-4356-9f0f-411778d31fcc'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},{
|
|
35
|
+
code: 'video-ad',
|
|
36
|
+
sizes: [[300, 50]],
|
|
37
|
+
mediaType: 'video',
|
|
38
|
+
bids: [
|
|
39
|
+
{
|
|
40
|
+
bidder: "futureads",
|
|
41
|
+
params: {
|
|
42
|
+
zone: 'ebeb1e79-8cb4-4473-b2d0-2e24b7ff47fd'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
```
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { BANNER } from '../src/mediaTypes.js'
|
|
2
|
+
import { config } from '../src/config.js'
|
|
2
3
|
import { getStorageManager } from '../src/storageManager.js'
|
|
3
4
|
import { isArray } from '../src/utils.js'
|
|
4
5
|
import { registerBidder } from '../src/adapters/bidderFactory.js'
|
|
5
6
|
|
|
6
7
|
const storageManager = getStorageManager()
|
|
7
8
|
|
|
9
|
+
const GVLID = 1012
|
|
8
10
|
const BIDDER_CODE = 'glimpse'
|
|
9
11
|
const ENDPOINT = 'https://api.glimpsevault.io/ads/serving/public/v1/prebid'
|
|
10
12
|
const LOCAL_STORAGE_KEY = {
|
|
11
|
-
|
|
13
|
+
vault: {
|
|
12
14
|
jwt: 'gp_vault_jwt',
|
|
13
15
|
},
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
export const spec = {
|
|
19
|
+
gvlid: GVLID,
|
|
17
20
|
code: BIDDER_CODE,
|
|
18
21
|
supportedMediaTypes: [BANNER],
|
|
19
22
|
|
|
@@ -37,20 +40,28 @@ export const spec = {
|
|
|
37
40
|
* @returns {ServerRequest}
|
|
38
41
|
*/
|
|
39
42
|
buildRequests: (validBidRequests, bidderRequest) => {
|
|
40
|
-
const
|
|
41
|
-
const
|
|
43
|
+
const demo = config.getConfig('glimpse.demo') || false
|
|
44
|
+
const account = config.getConfig('glimpse.account') || -1
|
|
45
|
+
const demand = config.getConfig('glimpse.demand') || 'glimpse'
|
|
46
|
+
const keywords = config.getConfig('glimpse.keywords') || {}
|
|
47
|
+
|
|
48
|
+
const auth = getVaultJwt()
|
|
42
49
|
const referer = getReferer(bidderRequest)
|
|
43
50
|
const gdprConsent = getGdprConsentChoice(bidderRequest)
|
|
44
|
-
const
|
|
51
|
+
const bids = validBidRequests.map((bidRequest) => {
|
|
52
|
+
return processBidRequest(bidRequest, keywords)
|
|
53
|
+
})
|
|
45
54
|
|
|
46
55
|
const data = {
|
|
47
|
-
auth
|
|
56
|
+
auth,
|
|
48
57
|
data: {
|
|
49
58
|
bidderCode: spec.code,
|
|
50
|
-
|
|
51
|
-
|
|
59
|
+
demo,
|
|
60
|
+
account,
|
|
61
|
+
demand,
|
|
52
62
|
referer,
|
|
53
63
|
gdprConsent,
|
|
64
|
+
bids,
|
|
54
65
|
}
|
|
55
66
|
}
|
|
56
67
|
|
|
@@ -65,10 +76,9 @@ export const spec = {
|
|
|
65
76
|
/**
|
|
66
77
|
* Parse response from Glimpse server
|
|
67
78
|
* @param bidResponse {ServerResponse}
|
|
68
|
-
* @param bidRequest {BidRequest}
|
|
69
79
|
* @returns {Bid[]}
|
|
70
80
|
*/
|
|
71
|
-
interpretResponse: (bidResponse
|
|
81
|
+
interpretResponse: (bidResponse) => {
|
|
72
82
|
const isValidResponse = isValidBidResponse(bidResponse)
|
|
73
83
|
|
|
74
84
|
if (isValidResponse) {
|
|
@@ -81,16 +91,20 @@ export const spec = {
|
|
|
81
91
|
},
|
|
82
92
|
}
|
|
83
93
|
|
|
84
|
-
function processBidRequest(bidRequest) {
|
|
94
|
+
function processBidRequest(bidRequest, globalKeywords) {
|
|
85
95
|
const sizes = normalizeSizes(bidRequest.sizes)
|
|
86
|
-
const
|
|
96
|
+
const bidKeywords = bidRequest.params.keywords || {}
|
|
97
|
+
const keywords = {
|
|
98
|
+
...globalKeywords,
|
|
99
|
+
...bidKeywords,
|
|
100
|
+
}
|
|
87
101
|
|
|
88
102
|
return {
|
|
103
|
+
unitCode: bidRequest.adUnitCode,
|
|
89
104
|
bidId: bidRequest.bidId,
|
|
90
105
|
placementId: bidRequest.params.placementId,
|
|
91
|
-
unitCode: bidRequest.adUnitCode,
|
|
92
|
-
sizes,
|
|
93
106
|
keywords,
|
|
107
|
+
sizes,
|
|
94
108
|
}
|
|
95
109
|
}
|
|
96
110
|
|
|
@@ -127,7 +141,14 @@ function getGdprConsentChoice(bidderRequest) {
|
|
|
127
141
|
hasValue(bidderRequest.gdprConsent)
|
|
128
142
|
|
|
129
143
|
if (hasGdprConsent) {
|
|
130
|
-
|
|
144
|
+
const gdprConsent = bidderRequest.gdprConsent
|
|
145
|
+
const hasGdprApplies = hasBooleanValue(gdprConsent.gdprApplies)
|
|
146
|
+
|
|
147
|
+
return {
|
|
148
|
+
consentString: gdprConsent.consentString || '',
|
|
149
|
+
vendorData: gdprConsent.vendorData || {},
|
|
150
|
+
gdprApplies: hasGdprApplies ? gdprConsent.gdprApplies : true,
|
|
151
|
+
}
|
|
131
152
|
}
|
|
132
153
|
|
|
133
154
|
return {
|
|
@@ -138,11 +159,11 @@ function getGdprConsentChoice(bidderRequest) {
|
|
|
138
159
|
}
|
|
139
160
|
|
|
140
161
|
function setVaultJwt(auth) {
|
|
141
|
-
storageManager.setDataInLocalStorage(LOCAL_STORAGE_KEY.
|
|
162
|
+
storageManager.setDataInLocalStorage(LOCAL_STORAGE_KEY.vault.jwt, auth)
|
|
142
163
|
}
|
|
143
164
|
|
|
144
165
|
function getVaultJwt() {
|
|
145
|
-
return storageManager.getDataFromLocalStorage(LOCAL_STORAGE_KEY.
|
|
166
|
+
return storageManager.getDataFromLocalStorage(LOCAL_STORAGE_KEY.vault.jwt) || ''
|
|
146
167
|
}
|
|
147
168
|
|
|
148
169
|
function isValidBidResponse(bidResponse) {
|
|
@@ -162,6 +183,13 @@ function hasValue(value) {
|
|
|
162
183
|
)
|
|
163
184
|
}
|
|
164
185
|
|
|
186
|
+
function hasBooleanValue(value) {
|
|
187
|
+
return (
|
|
188
|
+
hasValue(value) &&
|
|
189
|
+
typeof value === 'boolean'
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
|
|
165
193
|
function hasStringValue(value) {
|
|
166
194
|
return (
|
|
167
195
|
hasValue(value) &&
|