Sha256: 56af64c2c9de9e03f37a093614465000ac3a6e700219543b2deeb43e52cab3c5
Contents?: true
Size: 1.01 KB
Versions: 3
Compression:
Stored size: 1.01 KB
Contents
"use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const EventInit = require("./EventInit"); module.exports = { convertInherit(obj, ret) { EventInit.convertInherit(obj, ret); let key, value; key = "detail"; value = obj === undefined || obj === null ? undefined : obj[key]; if (value !== undefined) { ret[key] = conversions["long"](value); } else { ret[key] = 0; } key = "view"; value = obj === undefined || obj === null ? undefined : obj[key]; if (value !== undefined) { ret[key] = (value); } else { ret[key] = null; } }, convert(obj) { if (obj !== undefined && typeof obj !== "object") { throw new TypeError("Dictionary has to be an object"); } if (obj instanceof Date || obj instanceof RegExp) { throw new TypeError("Dictionary may not be a Date or RegExp object"); } const ret = Object.create(null); module.exports.convertInherit(obj, ret); return ret; } };
Version data entries
3 entries across 3 versions & 3 rubygems