File Explorer

/var/lang/lib/node_modules/npm/node_modules/@tufjs/models/dist/utils

This explorer reads the filesystem of the server it runs on, so /workspace/user isn't present here. Browsing and the terminal still work against this server's own disk from /.

guard.js1.1 KB · 33 lines
"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));}