iab-vast-parser
Version:
Parses IAB VAST tags into iab-vast-model objects.
13 lines (11 loc) • 313 B
JavaScript
import createInLine from './in-line'
import createWrapper from './wrapper'
export default ($ad, options) => {
if ($ad.inLine != null) {
return createInLine($ad, options)
} else if ($ad.wrapper != null) {
return createWrapper($ad, options)
} else {
throw new Error('Unrecognized ad type')
}
}