'use strict';
var userHome = require('user-home');

module.exports = function (str) {
	return userHome ? str.replace(/^~\//, userHome + '/') : str;
};

'use strict';
var userHome = require('user-home');

module.exports = function (str) {
	if (typeof str !== 'string') {
		throw new TypeError('Expected a string');
	}
	return userHome ? str.replace(/^~\//, userHome + '/') : str;
};

Throw if input is not a string
Throw if input is not a string
