Prepare 1.8.6 release

This commit is contained in:
Nick Cipollo
2021-05-24 11:25:03 -04:00
parent d1125b4510
commit 880be3d0a7
442 changed files with 156407 additions and 1 deletions
+12
View File
@@ -0,0 +1,12 @@
'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;
};