UNPKG

yahoo-finance2

Version:
37 lines (36 loc) 1.03 kB
"use strict"; // Copyright 2018-2025 the Deno authors. MIT license. // This module is browser compatible. Object.defineProperty(exports, "__esModule", { value: true }); exports.common = common; const common_js_1 = require("./_common/common.js"); const constants_js_1 = require("./constants.js"); /** * Determines the common path from a set of paths for the given OS. * * @param paths Paths to search for common path. * @returns The common path. * * @example Usage * ```ts * import { common } from "@std/path/common"; * import { assertEquals } from "@std/assert"; * * if (Deno.build.os === "windows") { * const path = common([ * "C:\\deno\\std\\path\\mod.ts", * "C:\\deno\\std\\fs\\mod.ts" * ]); * assertEquals(path, "C:\\deno\\std\\"); * } else { * const path = common([ * "./deno/std/path/mod.ts", * "./deno/std/fs/mod.ts" * ]); * assertEquals(path, "./deno/std/"); * } * ``` */ function common(paths) { return (0, common_js_1.common)(paths, constants_js_1.SEPARATOR); }