<% if (isProjectOnNpm) { -%>
<% } -%>
<% if (projectVersion && !isProjectOnNpm) { -%>
<% } -%>
<% if (projectPrerequisites) { -%>
<% projectPrerequisites.map(({ name, value }) => { -%>
<% }) -%>
<% } -%>
<% if (projectDocumentationUrl) { -%>
<% } -%>
<% if (isGithubRepos) { -%>
<% } -%>
<% if (licenseName) { -%>
<% } -%>
<% if (authorTwitterUsername) { -%>
<% } -%>
<%= projectDescription %> <% } -%>
npm install --save <%= projectName %>
patha
is tiny and treeshakable.
Automatic (depends on your build system)
import * as patha from "patha"
Node
import * as patha from "patha/dist/index.node.mjs"
Node CJS
const patha = require("patha/dist/index.node.cjs")
Browser
import * as patha from "patha/dist/index.browser.mjs"
Browser Legacy
import * as patha from "patha/dist/index.browser.legacy.js"
Deno
import * as patha from "patha/dist/index.deno.mjs"
patha
is a drop-replacement for path
, which is explained in the Nodejs documentation.
import {
basename,
delimiter,
dirname,
extname,
format,
isAbsolute,
join,
normalize,
parse,
posix,
relative,
resolve,
sep,
toNamespacedPath,
win32,
} from "patha"
Additionally, patha
supports the following functions:
You can sponsor my work here:
https://github.com/sponsors/aminya
Pull requests, issues and feature requests are welcome. See the Contributing guide.