1.0.2 • Published 8 years ago

xfluent v1.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

XFLUENT

Fluent api for reading javascript documents/xml objects

Usage

var fluent = new XFluent(doc)

fluent
  .get('Linear')
  .get('MediaFile')
  .filterByAttribute('type', 'bitrate', (type, bitrate) => {
    bitrate = Number(bitrate)
    // options is a variable that I already have
    return (options.supportedMediaTypes.indexOf(type) !== -1 &&
      (bitrate >= options.mediaBitrateMim && bitrate <= options.mediaBitrateMax))
  })
  .each((el) => {
    videoUrl = el.childNodes[0].nodeValue
  })
  .up()
  .get('ClickThrough')
  .each((el) => {
    videoClickThrough = el.childNodes[0].nodeValue
  })
  .end()
1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago