@antora/expand-path-helper
Advanced tools
Comparing version 1.0.0-rc.3 to 1.0.0
@@ -25,3 +25,3 @@ 'use strict' | ||
* @param {String} [start='~+'] - The path to use as a starting point for a | ||
* relative path. If not absolute, the value will first be resolved starting | ||
* relative path. Unless absolute, the value will first be expanded starting | ||
* from the current working directory of the process. | ||
@@ -28,0 +28,0 @@ * @param {String} [dot='.'] - The value used to replace a leading dot segment. |
{ | ||
"name": "@antora/expand-path-helper", | ||
"version": "1.0.0-rc.3", | ||
"description": "A helper function to expand a path to an absolute path, first resolving leading shorthands such as dot (.), tilde (~), and tilde plus (~+).", | ||
"version": "1.0.0", | ||
"description": "A helper function to expand a path to an absolute path, including expanding the first segment if it matches a shorthand expression, dot (.), tilde (~), or tilde plus (~+).", | ||
"license": "MPL-2.0", | ||
@@ -6,0 +6,0 @@ "author": "OpenDevise Inc. (https://opendevise.com)", |
# @antora/expand-path-helper | ||
A node module that exports a helper function to expand a path to an absolute path, first resolving leading shortcuts such as dot (`.`), tilde (`~`), and tilde plus (`~+`). | ||
A module for Node.js that provides a helper function to expand a path to an absolute path. | ||
This function expands the first segment if it matches a shorthand expression, dot (`.`), tilde (`~`), or tilde plus (`~+`). | ||
The expanded path is system dependent. | ||
Developed for use in Antora. | ||
@@ -21,3 +23,3 @@ | ||
```js | ||
function expandPath (path, start = process.cwd(), dot = '.') { ... } | ||
function expandPath (path, start = '~+', dot = '.') { ... } | ||
``` | ||
@@ -29,5 +31,5 @@ | ||
This parameter is required and must not be falsy. | ||
* `start` - The starting directory from which to resolve a relative path. | ||
* `start` - The starting directory from which to anchor a relative path. | ||
This parameter is optional. | ||
It defaults to the current working directory of the process. | ||
It defaults to the current working directory of the process (`~+`). | ||
* `dot` - The value to use to replace a leading dot (`.`) segment. | ||
@@ -34,0 +36,0 @@ This parameter is optional. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
24312
1
112