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: //home/arjun/projects/propbase/propbase_website/node_modules/env-cmd/dist/utils.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const os = require("os");
/**
 * A simple function for resolving the path the user entered
 */
function resolveEnvFilePath(userPath) {
    // Make sure a home directory exist
    const home = os.homedir();
    if (home !== undefined) {
        userPath = userPath.replace(/^~($|\/|\\)/, `${home}$1`);
    }
    return path.resolve(process.cwd(), userPath);
}
exports.resolveEnvFilePath = resolveEnvFilePath;
/**
 * A simple function that parses a comma separated string into an array of strings
 */
function parseArgList(list) {
    return list.split(',');
}
exports.parseArgList = parseArgList;
/**
 * A simple function to test if the value is a promise
 */
function isPromise(value) {
    return value != null && typeof value.then === 'function';
}
exports.isPromise = isPromise;