refactor(Cypress): Moved Cypress to the main folder of the project, as I don't need a sub project for now.
This commit is contained in:
12
node_modules/untildify/index.js
generated
vendored
Normal file
12
node_modules/untildify/index.js
generated
vendored
Normal 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;
|
||||
};
|
Reference in New Issue
Block a user