@oazmi/build-tools
Version:
general deno build tool scripts which I practically use in all of my typescript repos
15 lines (14 loc) • 522 B
JavaScript
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { isWindows } from "./_os.js";
import { format as posixFormat } from "./posix/format.js";
import { format as windowsFormat } from "./windows/format.js";
/**
* Generate a path from `FormatInputPathObject` object. It does the opposite
* of `parse`.
*
* @param pathObject with path
*/
export function format(pathObject) {
return isWindows ? windowsFormat(pathObject) : posixFormat(pathObject);
}