@file-services/posix-path

v2.1.0
Node's posix-`path` implementation converted to TypeScript and ready for the web.

@file-services/posix-path

npm version package size

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 assumes cwd is /.
  • Removed runtime validation of parameters.
  • Fixed shadowed start variable in parse function.
  • Converted loops to for-const-of, where possible.
  • Changed var statements to const/let statements.
  • Applied prettier code formatting.

License

MIT

npm i @file-services/posix-path

Metadata

  • MIT
  • Whatever
  • Unknown
  • released 11/12/2019

Downloads