UNPKG

iab-vast-parser

Version:

Parses IAB VAST tags into iab-vast-model objects.

25 lines (16 loc) 1.06 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _TYPES$bool$TYPES$int; var _types = require('./types'); var _types2 = _interopRequireDefault(_types); var _parseTime = require('../util/parse-time'); var _parseTime2 = _interopRequireDefault(_parseTime); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } exports.default = (_TYPES$bool$TYPES$int = {}, _defineProperty(_TYPES$bool$TYPES$int, _types2.default.bool, function (str) { return str === 'true' || str === '1'; }), _defineProperty(_TYPES$bool$TYPES$int, _types2.default.int, function (str) { return parseInt(str, 10); }), _defineProperty(_TYPES$bool$TYPES$int, _types2.default.float, parseFloat), _defineProperty(_TYPES$bool$TYPES$int, _types2.default.time, _parseTime2.default), _TYPES$bool$TYPES$int);