Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bezoerb committed Sep 14, 2023
1 parent c8a7bfa commit 311e601
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/file.js
Expand Up @@ -62,9 +62,7 @@ export function normalizePath(str) {
* @returns {boolean} True if the path is remote
*/
export function isRemote(href) {
return (
typeof href === 'string' && !Buffer.isBuffer(href) && /(^\/\/)|(:\/\/)/.test(href) && !href.startsWith('file:')
);
return typeof href === 'string' && /(^\/\/)|(:\/\/)/.test(href) && !href.startsWith('file:');
}

/**
Expand Down Expand Up @@ -120,7 +118,7 @@ export function urlResolve(from = '', to = '') {
}

function isFilePath(href) {
return typeof href === 'string' && !Buffer.isBuffer(href) && !isRemote(href);
return typeof href === 'string' && !isRemote(href);
}

export function isAbsolute(href) {
Expand Down

0 comments on commit 311e601

Please sign in to comment.