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

@dailymotion/vmap

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dailymotion/vmap - npm Package Compare versions

Comparing version 3.3.0 to 3.3.1

2

.eslintrc.js

@@ -8,3 +8,3 @@ module.exports = {

},
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
parserOptions: {

@@ -11,0 +11,0 @@ sourceType: 'module',

@@ -1,1 +0,1 @@

"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var a=function e(a){for(var n in t(this,e),this.id=a.getAttribute("id"),this.allowMultipleAds=a.getAttribute("allowMultipleAds"),this.followRedirects=a.getAttribute("followRedirects"),this.vastAdData=null,this.adTagURI=null,this.customData=null,a.childNodes){var i=a.childNodes[n];switch(i.localName){case"AdTagURI":this.adTagURI={templateType:i.getAttribute("templateType"),uri:(i.textContent||i.text||"").trim()};break;case"VASTAdData":for(this.vastAdData=i.firstChild;this.vastAdData&&1!==this.vastAdData.nodeType;)this.vastAdData=this.vastAdData.nextSibling;break;case"CustomAdData":this.customData=i}}};function n(t,e){var a=[];for(var n in t.childNodes){var i=t.childNodes[n];i.nodeName!==e&&e!=="vmap:".concat(i.nodeName)&&i.nodeName!=="vmap:".concat(e)||a.push(i)}return a}function i(t){var e={attributes:{},children:{},value:{}};e.value=function(t){if(!t||!t.childNodes)return{};var e=t.childNodes,a=[];for(var n in e){var i=e[n];"#cdata-section"===i.nodeName&&a.push(i)}if(a&&a.length>0)try{return JSON.parse(a[0].data)}catch(t){}var r="";for(var s in e){var o=e[s];switch(o.nodeName){case"#text":r+=o.textContent.trim();break;case"#cdata-section":r+=o.data}}return r}(t);var a=t.attributes;if(a)for(var n in a){var r=a[n];r.nodeName&&void 0!==r.nodeValue&&null!==r.nodeValue&&(e.attributes[r.nodeName]=r.nodeValue)}var s=t.childNodes;if(s)for(var o in s){var c=s[o];c.nodeName&&"#"!==c.nodeName.substring(0,1)&&(e.children[c.nodeName]=i(c))}return e}var r=function(){function r(e){for(var s in t(this,r),this.timeOffset=e.getAttribute("timeOffset"),this.breakType=e.getAttribute("breakType"),this.breakId=e.getAttribute("breakId"),this.repeatAfter=e.getAttribute("repeatAfter"),this.adSource=null,this.trackingEvents=[],this.extensions=[],e.childNodes){var o=e.childNodes[s];switch(o.localName){case"AdSource":this.adSource=new a(o);break;case"TrackingEvents":for(var c in o.childNodes){var d=o.childNodes[c];"Tracking"===d.localName&&this.trackingEvents.push({event:d.getAttribute("event"),uri:(d.textContent||d.text||"").trim()})}break;case"Extensions":this.extensions=n(o,"Extension").map((function(t){return i(t)}))}}}var s,o,c;return s=r,(o=[{key:"track",value:function(t,e){for(var a in this.trackingEvents){var n=this.trackingEvents[a];if(n.event===t){var i=n.uri;"error"===n.event&&(i=i.replace("[ERRORCODE]",e)),this.tracker(i)}}}},{key:"tracker",value:function(t){"undefined"!=typeof window&&null!==window&&((new Image).src=t)}}])&&e(s.prototype,o),c&&e(s,c),r}();module.exports=function e(a){if(t(this,e),!a||!a.documentElement||"VMAP"!==a.documentElement.localName)throw new Error("Not a VMAP document");for(var s in this.version=a.documentElement.getAttribute("version"),this.adBreaks=[],this.extensions=[],a.documentElement.childNodes){var o=a.documentElement.childNodes[s];switch(o.localName){case"AdBreak":this.adBreaks.push(new r(o));break;case"Extensions":this.extensions=n(o,"Extension").map((function(t){return i(t)}))}}};
"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var n=a((function e(a){for(var n in t(this,e),this.id=a.getAttribute("id"),this.allowMultipleAds=a.getAttribute("allowMultipleAds"),this.followRedirects=a.getAttribute("followRedirects"),this.vastAdData=null,this.adTagURI=null,this.customData=null,a.childNodes){var i=a.childNodes[n];switch(i.localName){case"AdTagURI":this.adTagURI={templateType:i.getAttribute("templateType"),uri:(i.textContent||i.text||"").trim()};break;case"VASTAdData":for(this.vastAdData=i.firstChild;this.vastAdData&&1!==this.vastAdData.nodeType;)this.vastAdData=this.vastAdData.nextSibling;break;case"CustomAdData":this.customData=i}}}));function i(t,e){var a=[];for(var n in t.childNodes){var i=t.childNodes[n];i.nodeName!==e&&e!=="vmap:".concat(i.nodeName)&&i.nodeName!=="vmap:".concat(e)||a.push(i)}return a}function r(t){var e={attributes:{},children:{},value:{}};e.value=function(t){if(!t||!t.childNodes)return{};var e=t.childNodes,a=[];for(var n in e){var i=e[n];"#cdata-section"===i.nodeName&&a.push(i)}if(a&&a.length>0)try{return JSON.parse(a[0].data)}catch(t){}var r="";for(var s in e){var o=e[s];switch(o.nodeName){case"#text":r+=o.textContent.trim();break;case"#cdata-section":r+=o.data}}return r}(t);var a=t.attributes;if(a)for(var n in a){var i=a[n];i.nodeName&&void 0!==i.nodeValue&&null!==i.nodeValue&&(e.attributes[i.nodeName]=i.nodeValue)}var s=t.childNodes;if(s)for(var o in s){var c=s[o];c.nodeName&&"#"!==c.nodeName.substring(0,1)&&(e.children[c.nodeName]=r(c))}return e}var s=function(){function e(a){for(var s in t(this,e),this.timeOffset=a.getAttribute("timeOffset"),this.breakType=a.getAttribute("breakType"),this.breakId=a.getAttribute("breakId"),this.repeatAfter=a.getAttribute("repeatAfter"),this.adSource=null,this.trackingEvents=[],this.extensions=[],a.childNodes){var o=a.childNodes[s];switch(o.localName){case"AdSource":this.adSource=new n(o);break;case"TrackingEvents":for(var c in o.childNodes){var d=o.childNodes[c];"Tracking"===d.localName&&this.trackingEvents.push({event:d.getAttribute("event"),uri:(d.textContent||d.text||"").trim()})}break;case"Extensions":this.extensions=i(o,"Extension").map((function(t){return r(t)}))}}}return a(e,[{key:"track",value:function(t,e){for(var a in this.trackingEvents){var n=this.trackingEvents[a];if(n.event===t){var i=n.uri;"error"===n.event&&(i=i.replace("[ERRORCODE]",e)),this.tracker(i)}}}},{key:"tracker",value:function(t){"undefined"!=typeof window&&null!==window&&((new Image).src=t)}}]),e}(),o=a((function e(a){if(t(this,e),!a||!a.documentElement||"VMAP"!==a.documentElement.localName)throw new Error("Not a VMAP document");for(var n in this.version=a.documentElement.getAttribute("version"),this.adBreaks=[],this.extensions=[],a.documentElement.childNodes){var o=a.documentElement.childNodes[n];switch(o.localName){case"AdBreak":this.adBreaks.push(new s(o));break;case"Extensions":this.extensions=i(o,"Extension").map((function(t){return r(t)}))}}}));module.exports=o;

@@ -1,1 +0,1 @@

var VMAP=function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var a=function e(a){for(var n in t(this,e),this.id=a.getAttribute("id"),this.allowMultipleAds=a.getAttribute("allowMultipleAds"),this.followRedirects=a.getAttribute("followRedirects"),this.vastAdData=null,this.adTagURI=null,this.customData=null,a.childNodes){var i=a.childNodes[n];switch(i.localName){case"AdTagURI":this.adTagURI={templateType:i.getAttribute("templateType"),uri:(i.textContent||i.text||"").trim()};break;case"VASTAdData":for(this.vastAdData=i.firstChild;this.vastAdData&&1!==this.vastAdData.nodeType;)this.vastAdData=this.vastAdData.nextSibling;break;case"CustomAdData":this.customData=i}}};function n(t,e){var a=[];for(var n in t.childNodes){var i=t.childNodes[n];i.nodeName!==e&&e!=="vmap:".concat(i.nodeName)&&i.nodeName!=="vmap:".concat(e)||a.push(i)}return a}function i(t){var e={attributes:{},children:{},value:{}};e.value=function(t){if(!t||!t.childNodes)return{};var e=t.childNodes,a=[];for(var n in e){var i=e[n];"#cdata-section"===i.nodeName&&a.push(i)}if(a&&a.length>0)try{return JSON.parse(a[0].data)}catch(t){}var r="";for(var s in e){var o=e[s];switch(o.nodeName){case"#text":r+=o.textContent.trim();break;case"#cdata-section":r+=o.data}}return r}(t);var a=t.attributes;if(a)for(var n in a){var r=a[n];r.nodeName&&void 0!==r.nodeValue&&null!==r.nodeValue&&(e.attributes[r.nodeName]=r.nodeValue)}var s=t.childNodes;if(s)for(var o in s){var c=s[o];c.nodeName&&"#"!==c.nodeName.substring(0,1)&&(e.children[c.nodeName]=i(c))}return e}var r=function(){function r(e){for(var s in t(this,r),this.timeOffset=e.getAttribute("timeOffset"),this.breakType=e.getAttribute("breakType"),this.breakId=e.getAttribute("breakId"),this.repeatAfter=e.getAttribute("repeatAfter"),this.adSource=null,this.trackingEvents=[],this.extensions=[],e.childNodes){var o=e.childNodes[s];switch(o.localName){case"AdSource":this.adSource=new a(o);break;case"TrackingEvents":for(var c in o.childNodes){var d=o.childNodes[c];"Tracking"===d.localName&&this.trackingEvents.push({event:d.getAttribute("event"),uri:(d.textContent||d.text||"").trim()})}break;case"Extensions":this.extensions=n(o,"Extension").map((function(t){return i(t)}))}}}var s,o,c;return s=r,(o=[{key:"track",value:function(t,e){for(var a in this.trackingEvents){var n=this.trackingEvents[a];if(n.event===t){var i=n.uri;"error"===n.event&&(i=i.replace("[ERRORCODE]",e)),this.tracker(i)}}}},{key:"tracker",value:function(t){"undefined"!=typeof window&&null!==window&&((new Image).src=t)}}])&&e(s.prototype,o),c&&e(s,c),r}();return function e(a){if(t(this,e),!a||!a.documentElement||"VMAP"!==a.documentElement.localName)throw new Error("Not a VMAP document");for(var s in this.version=a.documentElement.getAttribute("version"),this.adBreaks=[],this.extensions=[],a.documentElement.childNodes){var o=a.documentElement.childNodes[s];switch(o.localName){case"AdBreak":this.adBreaks.push(new r(o));break;case"Extensions":this.extensions=n(o,"Extension").map((function(t){return i(t)}))}}}}();
var VMAP=function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var n=a((function e(a){for(var n in t(this,e),this.id=a.getAttribute("id"),this.allowMultipleAds=a.getAttribute("allowMultipleAds"),this.followRedirects=a.getAttribute("followRedirects"),this.vastAdData=null,this.adTagURI=null,this.customData=null,a.childNodes){var r=a.childNodes[n];switch(r.localName){case"AdTagURI":this.adTagURI={templateType:r.getAttribute("templateType"),uri:(r.textContent||r.text||"").trim()};break;case"VASTAdData":for(this.vastAdData=r.firstChild;this.vastAdData&&1!==this.vastAdData.nodeType;)this.vastAdData=this.vastAdData.nextSibling;break;case"CustomAdData":this.customData=r}}}));function r(t,e){var a=[];for(var n in t.childNodes){var r=t.childNodes[n];r.nodeName!==e&&e!=="vmap:".concat(r.nodeName)&&r.nodeName!=="vmap:".concat(e)||a.push(r)}return a}function i(t){var e={attributes:{},children:{},value:{}};e.value=function(t){if(!t||!t.childNodes)return{};var e=t.childNodes,a=[];for(var n in e){var r=e[n];"#cdata-section"===r.nodeName&&a.push(r)}if(a&&a.length>0)try{return JSON.parse(a[0].data)}catch(t){}var i="";for(var s in e){var o=e[s];switch(o.nodeName){case"#text":i+=o.textContent.trim();break;case"#cdata-section":i+=o.data}}return i}(t);var a=t.attributes;if(a)for(var n in a){var r=a[n];r.nodeName&&void 0!==r.nodeValue&&null!==r.nodeValue&&(e.attributes[r.nodeName]=r.nodeValue)}var s=t.childNodes;if(s)for(var o in s){var c=s[o];c.nodeName&&"#"!==c.nodeName.substring(0,1)&&(e.children[c.nodeName]=i(c))}return e}var s=function(){function e(a){for(var s in t(this,e),this.timeOffset=a.getAttribute("timeOffset"),this.breakType=a.getAttribute("breakType"),this.breakId=a.getAttribute("breakId"),this.repeatAfter=a.getAttribute("repeatAfter"),this.adSource=null,this.trackingEvents=[],this.extensions=[],a.childNodes){var o=a.childNodes[s];switch(o.localName){case"AdSource":this.adSource=new n(o);break;case"TrackingEvents":for(var c in o.childNodes){var d=o.childNodes[c];"Tracking"===d.localName&&this.trackingEvents.push({event:d.getAttribute("event"),uri:(d.textContent||d.text||"").trim()})}break;case"Extensions":this.extensions=r(o,"Extension").map((function(t){return i(t)}))}}}return a(e,[{key:"track",value:function(t,e){for(var a in this.trackingEvents){var n=this.trackingEvents[a];if(n.event===t){var r=n.uri;"error"===n.event&&(r=r.replace("[ERRORCODE]",e)),this.tracker(r)}}}},{key:"tracker",value:function(t){"undefined"!=typeof window&&null!==window&&((new Image).src=t)}}]),e}();return a((function e(a){if(t(this,e),!a||!a.documentElement||"VMAP"!==a.documentElement.localName)throw new Error("Not a VMAP document");for(var n in this.version=a.documentElement.getAttribute("version"),this.adBreaks=[],this.extensions=[],a.documentElement.childNodes){var o=a.documentElement.childNodes[n];switch(o.localName){case"AdBreak":this.adBreaks.push(new s(o));break;case"Extensions":this.extensions=r(o,"Extension").map((function(t){return i(t)}))}}}))}();
{
"name": "@dailymotion/vmap",
"author": "Dailymotion <vast-client@dailymotion.com> (https://developer.dailymotion.com/)",
"version": "3.3.0",
"version": "3.3.1",
"description": "Javascript VMAP Parser",

@@ -20,3 +20,3 @@ "keywords": [

"engines": {
"node": ">=8.9.4"
"node": ">=12.22.1"
},

@@ -26,3 +26,3 @@ "main": "dist/vmap-js-node.js",

"scripts": {
"test": "jasmine",
"test": "jest",
"build": "rollup -c rollup.config.js",

@@ -34,11 +34,12 @@ "precommit": "eslint --fix . && pretty-quick --staged",

"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/core": "^7.19.3",
"@babel/eslint-parser": "^7.19.1",
"@babel/preset-env": "^7.12.11",
"@babel/register": "^7.12.10",
"babel-eslint": "^10.1.0",
"eslint": "^7.17.0",
"@rollup/plugin-babel": "^6.0.0",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-no-for-of-loops": "^1.0.1",
"husky": "^4.3.6",
"jasmine": "^3.6.3",
"jest": "^29.1.2",
"path": "^0.12.7",

@@ -48,3 +49,2 @@ "prettier": "2.2.1",

"rollup": "^2.35.1",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-terser": "^7.0.2",

@@ -51,0 +51,0 @@ "xmldom": "github:xmldom/xmldom#0.7.0"

@@ -1,2 +0,2 @@

import babel from 'rollup-plugin-babel';
import babel from '@rollup/plugin-babel';
import { terser } from 'rollup-plugin-terser';

@@ -3,0 +3,0 @@ import path from 'path';

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