UNPKG

abi.js

Version:

[![typescript-icon]][typescript-link] [![license-icon]][license-link] [![status-icon]][status-link] [![ci-icon]][ci-link] [![twitter-icon]][twitter-link]

18 lines (17 loc) 602 B
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright the Browserify authors. MIT License. import { resolve } from "../../path/1.0.2/resolve.js"; import { toPathString } from "./_to_path_string.js"; /** * Checks if two paths are the same. * * @param src Source file path as a string or URL. * @param dest Destination file path as a string or URL. * * @returns `true` if the paths are the same, `false` otherwise. */ export function isSamePath(src, dest) { src = toPathString(src); dest = toPathString(dest); return resolve(src) === resolve(dest); }