time-to-botec/js/node_modules/@stdlib/utils/convert-path/docs/repl.txt

36 lines
830 B
Plaintext
Raw Normal View History

{{alias}}( from, to )
Converts between POSIX and Windows paths.
Parameters
----------
from: string
Input path.
to: string
Output path convention: 'win32', 'mixed', or 'posix'.
Returns
-------
out: string
Converted path.
Examples
--------
> var out = {{alias}}( '/c/foo/bar/beep.c', 'win32' )
'c:\\foo\\bar\\beep.c'
> out = {{alias}}( '/c/foo/bar/beep.c', 'mixed' )
'c:/foo/bar/beep.c'
> out = {{alias}}( '/c/foo/bar/beep.c', 'posix' )
'/c/foo/bar/beep.c'
> out = {{alias}}( 'C:\\\\foo\\bar\\beep.c', 'win32' )
'C:\\\\foo\\bar\\beep.c'
> out = {{alias}}( 'C:\\\\foo\\bar\\beep.c', 'mixed' )
'C:/foo/bar/beep.c'
> out = {{alias}}( 'C:\\\\foo\\bar\\beep.c', 'posix' )
'/c/foo/bar/beep.c'
See Also
--------