Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 421 Bytes

README.md

File metadata and controls

10 lines (8 loc) · 421 Bytes

hf.pathToPs(path, separator)

no more worry about working with PowerShell from node child_process. e.g. :

let path = hf.pathToPs('C:/Users/ashkan nasirzadeh/check.ps1', '/');
//path: C:\"Users"\"ashkan nasirzadeh"\"check.ps1"
child = spawn("powershell.exe",[path]);

leave 'separator' parameter and it will use default DirectorySeparator by OS (like path module) (const os = require('os') needed)