Coder Social home page Coder Social logo

unruly / vast-parser Goto Github PK

View Code? Open in Web Editor NEW
20.0 21.0 5.0 630 KB

Recursively requests and parses VAST chains into a single JavaScript object.

Home Page: https://www.npmjs.com/package/@unruly/vast-parser

License: MIT License

JavaScript 100.00%
adtech vast vast-tools xml

vast-parser's People

Contributors

andreacatalucci avatar gmmorris avatar jahed avatar mrwilson avatar tomaslibal avatar vikki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vast-parser's Issues

Newbie user error, unable to call requestVastChain

This isn't an issue, just a newbie user error. I'm having a difficult time setting up a basic test page. I created an index.html file and used the vast-parser.amd.js script but i'm unable to call the vastAdManager.requestVastChain to load the vast .xml that I would like to parse. Is there a little more detail you can give about setup or maybe provide a working html file?

Migrate to a typed language (e.g. TypeScript)

Due to the core use case of vast-parser being to transform data from one structure to another, a type system will provide a huge benefit.

The main benefit is that the structure of VastResponse can be self-documented and enforced. Right now, that structure isn't entirely obvious.

The other benefit is to auto-generate documentation (by using something like typedoc). Keeping the README up-to-date and accurate by hand isn't easy.

With a type system, it'll also make it easier to move towards a more functional approach. Eventually allowing an application to tree-shake any unused code.

Remove jQuery dependency

jQuery is currently used for:

  • Event Emission
  • Requesting VAST via AJAX

This seems overkill considering how large jQuery is.

Event Emission

Event Emission can be reimplemented easily, or a smaller library can be used.

AJAX

We can switch over to the Fetch API for requesting VAST. We have multiple options:

  1. Use the Fetch API directly and assume it's on global scope. If an application supports an environment that doesn't have the Fetch API, they're expect to polyfill it on their end (ideally via dynamic imports or targeted bundles).
  2. Use a polyfill like isomorphic-fetch. This will increase the size of library and not all environment will need the polyfill.

I'd go with Option 1 as the Fetch API seems widely supported in most browsers. And IMO, supplying polyfills for certain environments is not the job of a library.

Security Vulnerabilities

On Install packages need to be upgraded.

I am a current Unruly employee, is anyone still working on this are have ownership (can be contacted)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.