shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
grabFirstExistingSync
Type:Function
Status:stable
Since:1.0.0
Platform:node
@blackbyte.sugar.node.fs
Check every passed paths and return the first existing one.
Params
- paths*-String[]
The paths to check
Return
- -String
The first existing path
Example
import { grabFirstExistingSync } from '@blackbyte/sugar/fs';
grabFirstExistingSync([
'file/1.txt',
'file/2.txt'
]); // => 'file/2.txt'Todo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space