Skip to content

devunrulymedia/iab-vast-model

 
 

Repository files navigation

iab-vast-model

npm Dependencies Build Status Coverage Status JavaScript Standard Style

Base classes for IAB VAST handling. Supports the full IAB VAST 3.0 specification.

To parse a tag into model objects, use iab-vast-parser. To load and parse a chain of VAST files, use iab-vast-loader.

Usage

import { VAST } from 'iab-vast-model'

const vast = new VAST()
// ... Do your thing ...

API

Automatically generated API documentation can be found on GitHub Pages. You can also open docs/index.html in a Web browser. Running gulp doc will (re)build the docs directory.

Additionally, feel free to look at the source code. We recommend starting with src/index.js, which should export all the classes you need.

TODO

The main thing that's missing is validation. There are a few steps to this:

  • Use validator to check all values passed to setters.
  • Verify that every required property is set.
  • Write tests for the validation code.
  • Enclose all validation code in marker comments (e.g., // <strict>). This will allow us to strip it out and produce a lightweight "loose" build without any validation, making tags load faster.

PRs welcome!

Maintainer

Tim De Pauw

License

MIT

Packages

No packages published

Languages

  • JavaScript 99.7%
  • HTML 0.3%