JSPM

openrtb-macrosub

0.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q32491F
  • License MIT

A NodeJS implementation of the OpenRTB 2.3 macro substritution.

Package Exports

  • openrtb-macrosub

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (openrtb-macrosub) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

#OpenRTB Macro Substitutor# Build Status

##Usage##

var sub = require('./openrtb-macrosub');

sub('http://some/crazy/win/URL/{$AUCTION_ID}/{$AUCTION_PRICE}', {id: 'some-id', price: 500});
// This will output 'http://some/crazy/win/URL/some-id/500'.


sub('http://some/URL/needs/{$AUCTION_SEAT_ID}', {seat: 'e$c4p ed'}, true);
// This will output 'http://some/URL/needs/e%24c4p%20ed'.

##TODO##

  • Support macro encoding.