lib/isSymlink.js
async function isSymlink(filename){
    try{
        // get stats
        const stats = await _fs.lstat(filename);

        // is symlink ?
        return stats.isSymbolicLink();
    }catch(e){
        // file not found error ?
        if (e.code === 'ENOENT'){
            return false;
        }else{
            throw e;
        }
    }
}
async function isSymlink(filename){
    try{
        // get stats
        const stats = await _fs.lstat(filename);

        // is symlink ?
        return stats.isSymbolicLink();
    }catch(e){
        // file not found error ?
        if (e.code === 'ENOENT'){
            return false;
        }else{
            throw e;
        }
    }
}
async function isSymlink ( filename ) { try { // get stats const stats = await _fs . lstat ( filename ) ; // is symlink ? return stats . isSymbolicLink ( ) ; } catch ( e ) { // file not found error ? if ( e . code === 'ENOENT' ) { return false ; } else { throw e ; } } }
check if node is a symlink
check if node is a symlink