@file-services/posix-path
v2.1.0@file-services/posix-path
Node's posix-path
implementation converted to TypeScript and ready for the web.
Original code: https://github.com/nodejs/node/blob/master/lib/path.js
Fork changes
- Dropped win32-related functionality.
- Ported to Typescript.
- Separated to files using
esm
imports/exports. resolve
function assumescwd
is/
.- Removed runtime validation of parameters.
- Fixed shadowed
start
variable inparse
function. - Converted loops to
for-const-of
, where possible. - Changed
var
statements toconst
/let
statements. - Applied prettier code formatting.
License
MIT
npm i @file-services/posix-path
Metadata
- MIT
- Whatever
- Unknown
- released 11/12/2019