time-to-botec/js/node_modules/@stdlib/assert/is-absolute-path/docs/repl.txt
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

74 lines
1.4 KiB
Plaintext

{{alias}}( value )
Tests if a value is an absolute path.
Function behavior is platform-specific. On Windows platforms, the function
is equal to `.win32()`. On POSIX platforms, the function is equal to
`.posix()`.
Parameters
----------
value: any
Value to test.
Returns
-------
bool: boolean
Boolean indicating if a value is an absolute path.
Examples
--------
// Windows environment:
> var bool = {{alias}}( 'C:\\foo\\bar\\baz' )
true
// POSIX environment:
> bool = {{alias}}( '/foo/bar/baz' )
true
{{alias}}.posix( value )
Tests if a value is a POSIX absolute path.
Parameters
----------
value: any
Value to test.
Returns
-------
bool: boolean
Boolean indicating if a value is a POSIX absolute path.
Examples
--------
> var bool = {{alias}}.posix( '/foo/bar/baz' )
true
> bool = {{alias}}.posix( 'foo/bar/baz' )
false
{{alias}}.win32( value )
Tests if a value is a Windows absolute path.
Parameters
----------
value: any
Value to test.
Returns
-------
bool: boolean
Boolean indicating if a value is a Windows absolute path.
Examples
--------
> var bool = {{alias}}.win32( 'C:\\foo\\bar\\baz' )
true
> bool = {{alias}}.win32( 'foo\\bar\\baz' )
false
See Also
--------