HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //proc/1233/root/usr/lib/node_modules/npm/node_modules/@tufjs/models/dist/utils/guard.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isDefined = isDefined;
exports.isObject = isObject;
exports.isStringArray = isStringArray;
exports.isObjectArray = isObjectArray;
exports.isStringRecord = isStringRecord;
exports.isObjectRecord = isObjectRecord;
function isDefined(val) {
    return val !== undefined;
}
function isObject(value) {
    return typeof value === 'object' && value !== null;
}
function isStringArray(value) {
    return Array.isArray(value) && value.every((v) => typeof v === 'string');
}
function isObjectArray(value) {
    return Array.isArray(value) && value.every(isObject);
}
function isStringRecord(value) {
    return (typeof value === 'object' &&
        value !== null &&
        Object.keys(value).every((k) => typeof k === 'string') &&
        Object.values(value).every((v) => typeof v === 'string'));
}
function isObjectRecord(value) {
    return (typeof value === 'object' &&
        value !== null &&
        Object.keys(value).every((k) => typeof k === 'string') &&
        Object.values(value).every((v) => typeof v === 'object' && v !== null));
}