Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

iab-vast-parser

Package Overview
Dependencies
Maintainers
6
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iab-vast-parser - npm Package Compare versions

Comparing version 0.5.1 to 0.6.0

17

lib/xml/unmarshaler.js

@@ -98,4 +98,6 @@ 'use strict';

var prop = toProperty(childName);
if (_this._isFreeform(parentName, childName)) {
_this._addFreeformChild(child, prop, node);
if (_this._isFreeformParent(parentName)) {
if (_this._isFreeformChild(parentName, childName)) {
_this._addFreeformChild(child, prop, node);
}
} else {

@@ -136,4 +138,9 @@ _this._addNodeChild(child, prop, node, parentName, childName);

}, {
key: '_isFreeform',
value: function _isFreeform(parentName, childName) {
key: '_isFreeformParent',
value: function _isFreeformParent(name) {
return this._freeforms[name] != null;
}
}, {
key: '_isFreeformChild',
value: function _isFreeformChild(parentName, childName) {
return hasPair(this._freeforms, parentName, childName);

@@ -147,2 +154,2 @@ }

exports.default = Unmarshaler;
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInhtbC91bm1hcnNoYWxlci5qcyJdLCJuYW1lcyI6WyJ0b1Byb3BlcnR5IiwicmUiLCJpbnNlcnQiLCJtIiwibGVuZ3RoIiwidG9Mb3dlckNhc2UiLCJzdWJzdHIiLCJjaGFyQXQiLCJzdHIiLCJyZXBsYWNlIiwiaGFzUGFpciIsIm1hcCIsInBhcmVudE5hbWUiLCJjaGlsZE5hbWUiLCJpbmRleE9mIiwiVW5tYXJzaGFsZXIiLCJjb2xsZWN0aW9ucyIsImZyZWVmb3JtcyIsInR5cGVzIiwiX2NvbGxlY3Rpb25zIiwiX2ZyZWVmb3JtcyIsIl90eXBlcyIsInhtbCIsIl9jcmVhdGVOb2RlIiwibm9kZSIsIk9iamVjdCIsImNyZWF0ZSIsIl92YWx1ZSIsIl9jb252ZXJ0UHJvc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cHJvcF0gfHwgW11cbiAgICBwYXJlbnROb2RlW3Byb3BdLnB1c2godGhpcy5fY3JlYXRlRnJlZWZvcm1Ob2RlKGNoaWxkKSlcbiAgfVxuXG4gIF9jb252ZXJ0UHJvcGVydHlWYWx1ZSAodmFsdWUsIHBhcmVudE5hbWUsIHByb3BlcnR5KSB7XG4gICAgY29uc3QgdHlwZUlkID0gKHRoaXMuX3R5cGVzW3BhcmVudE5hbWVdICE9IG51bGwpID8gdGhpcy5fdHlwZXNbcGFyZW50TmFtZV1bcHJvcGVydHldIDogbnVsbFxuICAgIHJldHVybiAodHlwZUlkICE9IG51bGwpID8gY29udmVydG9yc1t0eXBlSWRdKHZhbHVlKSA6IHZhbHVlXG4gIH1cblxuICBfaXNDb2xsZWN0aW9uIChwYXJlbnROYW1lLCBjaGlsZE5hbWUpIHtcbiAgICByZXR1cm4gaGFzUGFpcih0aGlzLl9jb2xsZWN0aW9ucywgcGFyZW50TmFtZSwgY2hpbGROYW1lKVxuICB9XHJcblxyXG4gIF9pc0ZyZWVmb3JtUGFyZW50IChuYW1lKSB7XHJcbiAgICByZXR1cm4gKHRoaXMuX2ZyZWVmb3Jtc1tuYW1lXSAhPSBudWxsKVxyXG4gIH1cblxuICBfaXNGcmVlZm9ybUNoaWxkIChwYXJlbnROYW1lLCBjaGlsZE5hbWUpIHtcbiAgICByZXR1cm4gaGFzUGFpcih0aGlzLl9mcmVlZm9ybXMsIHBhcmVudE5hbWUsIGNoaWxkTmFtZSlcbiAgfVxufVxuIl19
{
"name": "iab-vast-parser",
"version": "0.5.1",
"version": "0.6.0",
"description": "Parses IAB VAST tags into iab-vast-model objects.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -11,5 +11,4 @@ import {getText, getChildren, isElement} from './dom'

const hasPair = (map, parentName, childName) => {
return (map[parentName] != null && ~map[parentName].indexOf(childName))
}
const hasPair = (map, parentName, childName) =>
(map[parentName] != null && ~map[parentName].indexOf(childName))

@@ -66,4 +65,6 @@ export default class Unmarshaler {

const prop = toProperty(childName)
if (this._isFreeform(parentName, childName)) {
this._addFreeformChild(child, prop, node)
if (this._isFreeformParent(parentName)) {
if (this._isFreeformChild(parentName, childName)) {
this._addFreeformChild(child, prop, node)
}
} else {

@@ -100,5 +101,9 @@ this._addNodeChild(child, prop, node, parentName, childName)

_isFreeform (parentName, childName) {
_isFreeformParent (name) {
return (this._freeforms[name] != null)
}
_isFreeformChild (parentName, childName) {
return hasPair(this._freeforms, parentName, childName)
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc