/home/bdqbpbxa/demo-subdomains/ping-proxies.goodface.com.ua/node_modules/untildify/index.js
'use strict';
const os = require('os');

const homeDirectory = os.homedir();

module.exports = pathWithTilde => {
	if (typeof pathWithTilde !== 'string') {
		throw new TypeError(`Expected a string, got ${typeof pathWithTilde}`);
	}

	return homeDirectory ? pathWithTilde.replace(/^~(?=$|\/|\\)/, homeDirectory) : pathWithTilde;
};