vue-types
Version:
Prop types utility for Vue
30 lines (25 loc) • 708 B
JavaScript
;
const config = {
silent: false,
logLevel: "warn"
};
function isPlainObject(value) {
if (typeof value !== "object" || value === null) {
return false;
}
const prototype = Object.getPrototypeOf(value);
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
}
const typeDefaults = () => ({
func: () => void 0,
bool: true,
string: "",
number: 0,
array: () => [],
object: () => ({}),
integer: 0
});
exports.config = config;
exports.isPlainObject = isPlainObject;
exports.typeDefaults = typeDefaults;
//# sourceMappingURL=vue-types.D1zhuSli.cjs.map