1.6.0 • Published 4 years ago

adtec-inventory-comb v1.6.0

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

adtec-inventory-comb

Normalize publisher inventory values. This is initially intended to be done for the adition ad server.

Usage

import createInventoryMapping from '@sevenonemedia/adtec-formatdehyd';

const mappings = await fetch('https://ad.71.de/config/inventory-mapping.json');

const {
    mapFormat,
    mapCategory,
    mapSite,
    mapBrand,
    mapInventory
  } = createInventoryMapping(mappings);

// map a format
const newFormat = mapFormat('k-11-kommissare-im-einsatz')

// or why not the whole inventory object
const { newSite, newBrand, newCategory, newFormat } = mapInventory({
  site: 'pro7',
  brand: 'sat1',
  category: 'serien',
  format: 'die-wunderbare-welt-der-tierbabies'
});