Skip to content

Commit

Permalink
Justpremium Adapter: use filter instead of ...new Set (prebid#1895)
Browse files Browse the repository at this point in the history
* Justpremium adapter and unit tests.

* Fix test suit.

* Performance improvements.

* Changes requested in pull request review.

* Register justpremium adapter in adaptermanager

* pass through bid from request

* fix linting errors

* Load polyfills for older browsers

* Load polyfills if older browser

* Remove package-lock.json

* Copy new Justpremium adapter from feature/1.0 branch

* prebid#1881 Requested changes applied

* prebid#1892 Use `filter` instead `...new Set` to get unique values
  • Loading branch information
mkalafior authored and dluxemburg committed Jul 17, 2018
1 parent 543c124 commit ecc5ce1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/justpremiumBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ export const spec = {
const c = preparePubCond(validBidRequests)
const dim = getWebsiteDim()
const payload = {
zone: [...new Set(validBidRequests.map(b => {
zone: validBidRequests.map(b => {
return parseInt(b.params.zone)
}))].join(','),
}).filter((value, index, self) => {
return self.indexOf(value) === index
}),
hostname: getTopWindowLocation().hostname,
protocol: getTopWindowLocation().protocol.replace(':', ''),
sw: dim.screenWidth,
Expand Down

0 comments on commit ecc5ce1

Please sign in to comment.