Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BaseAdapter for the Prebid 0.x -> 1.x transition #1494

Merged
merged 22 commits into from
Sep 13, 2017
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c1080dd
Added a base adapter for single-request adapters, and ported the appn…
dbemiller Aug 17, 2017
70fcf51
Renamed the SingleRequestBidder to BidderFactory. Updated it to handl…
dbemiller Aug 18, 2017
211e7fc
Added a unit test for the delayExecution function.
dbemiller Aug 18, 2017
6246eaf
Merged from master. Fixed conflicts.
dbemiller Aug 18, 2017
d509150
Made newBidder a default import. Added some unit tests.
dbemiller Aug 18, 2017
8d4ebc1
Added more tests.
dbemiller Aug 21, 2017
7ffc16f
Merge branch 'master' of https://github.com/prebid/Prebid.js into sin…
dbemiller Aug 21, 2017
1f23044
Added more tests, and fixed a few bugs.
dbemiller Aug 22, 2017
8d1efa6
Merged from master. Fixed a conflict.
dbemiller Aug 23, 2017
a627a43
Changed an error to a log message. Fixed a small bug.
dbemiller Aug 23, 2017
ff99ff6
Merged from master, and fixed conflicts.
dbemiller Aug 31, 2017
c246aa6
Did the no-brainer improvements from PR comments.
dbemiller Aug 31, 2017
6c80c3d
Added spec-level support for aliases and mediaTypes. Aliases may stil…
dbemiller Aug 31, 2017
37399c7
Added support for aliases. Added more tests
dbemiller Sep 1, 2017
1b42995
Cleaned up some unnecessary code.
dbemiller Sep 1, 2017
5c3d645
Removed the GET/POST constants. Fixed some typos, and renamed some Re…
dbemiller Sep 1, 2017
31899f4
Merged from master. Fixed conflicts.
dbemiller Sep 6, 2017
735f2bc
Re-added some code for outstream rendering, which was apparently lost…
dbemiller Sep 6, 2017
dd4e595
Removed confusing use of this
dbemiller Sep 6, 2017
25f822a
Fixed lint error
dbemiller Sep 6, 2017
e63f2d6
Moved JSON parsing into the bidderFactory, and moved the JSDocs to th…
dbemiller Sep 6, 2017
13d3911
Removed placementCode from everywhere I could.
dbemiller Sep 7, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merged from master. Fixed conflicts.
  • Loading branch information
dbemiller committed Aug 18, 2017
commit 6246eaf54c14cd029b344ff0039bb58a6a030b0c
16 changes: 15 additions & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,10 +680,24 @@ export function delayExecution(func, numRequiredCalls) {
throw new Error(`numRequiredCalls must be a positive number. Got ${numRequiredCalls}`);
}
let numCalls = 0;
return function() {
return function () {
numCalls++;
if (numCalls === numRequiredCalls) {
func.apply(null, arguments);
}
}
}

/**
* https://stackoverflow.com/a/34890276/428704
* @export
* @param {array} xs
* @param {string} key
* @returns {${key_value}: ${groupByArray}, key_value: {groupByArray}}
*/
export function groupBy(xs, key) {
return xs.reduce(function(rv, x) {
(rv[x[key]] = rv[x[key]] || []).push(x);
return rv;
}, {});
}
You are viewing a condensed version of this merge commit. You can view the full changes here.