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.
import { VAST } from 'iab-vast-model'
const vast = new VAST()
// ... Do your thing ...
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.
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!
MIT