Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (validate.uri(pathname).error)
throw new Error(
`The value, "${pathname}", for the required argument "pathname" on the Podlet constructor is not defined or not valid.`,
);
if (validate.uri(manifest).error)
throw new Error(
`The value, "${manifest}", for the optional argument "manifest" on the Podlet constructor is not valid.`,
);
if (validate.content(content).error)
throw new Error(
`The value, "${content}", for the optional argument "content" on the Podlet constructor is not valid.`,
);
if (validate.fallback(fallback).error)
throw new Error(
`The value, "${fallback}", for the optional argument "fallback" on the Podlet constructor is not valid.`,
);
Object.defineProperty(this, 'name', {
value: name,
});
Object.defineProperty(this, 'version', {
value: version,
});
Object.defineProperty(this, '_pathname', {
value: this[_sanitize](pathname),
});