Package Exports
- @jamesarlow/tilde-path
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 (@jamesarlow/tilde-path) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
tilde-path
Node Path with support for leading tilde home strings
Overview
Developers and users shouldn't have to overthink whether tilde strings are supported in a given context.
This module patches the original path module so that leading tilde strings are handled by resolve and normalize.
Installation
npm install @jamesarlow/tilde-pathUsage
const path = require('tilde-path')
path.resolve('~')
// == os.homedir()
path.resolve('~', 'Documents')
// == os.homedir() + '/Documents'
path.resolve('~/Pictures')
// == os.homedir() + '/Pictures'