JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5562490
  • Score
    100M100P100Q203812F
  • License MIT

Operating system specific paths.

Package Exports

  • ospath

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ospath) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ospath

A JavaScript component that provides operating specific path values. Also a replacement for https://github.com/jprichardson/node-path-extra.

Installation

npm i --save ospath

API

ospath.data()

Returns the directory where an application should store its data directory.

  • Windows: %APPDATA%
  • OS X: ~/Library/Application Support
  • Unix-like: $XDG_CONFIG_HOME or ~/.config

ospath.home()

Returns the user's home directory.

  • Windows: %USERPROFILE%
  • Unix-like: $HOME

ospath.tmp()

Returns a temporary directory. Could also use require('os').tmpdir().

  • Windows: %TEMP%
  • Unix-like: /tmp

License

MIT