@stryke/path 0.15.1 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/append.cjs +1 -1
- package/dist/append.d.ts +6 -3
- package/dist/append.mjs +1 -1
- package/package.json +2 -2
package/dist/append.cjs
CHANGED
|
@@ -10,6 +10,6 @@ var _isParentPath = require("./is-parent-path.cjs");
|
|
|
10
10
|
var _joinPaths = require("./join-paths.cjs");
|
|
11
11
|
var _slash = require("./slash.cjs");
|
|
12
12
|
function appendPath(r, o = (0, _cwd.cwd)()) {
|
|
13
|
-
return (0, _slash.slash)((0, _isParentPath.isParentPath)(r, o) ? r : (0, _joinPaths.joinPaths)(
|
|
13
|
+
return (0, _slash.slash)((0, _isParentPath.isParentPath)(r, o) ? r : (0, _joinPaths.joinPaths)(o, r));
|
|
14
14
|
}
|
|
15
15
|
const append = exports.append = appendPath;
|
package/dist/append.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* If not already a parent path, append the base path from the beginning of the given child path.
|
|
3
3
|
*
|
|
4
4
|
* @example
|
|
5
5
|
* ```ts
|
|
6
|
-
* appendPath("
|
|
7
|
-
* // returns "src/index.ts"
|
|
6
|
+
* appendPath("src/index.ts", "/home/user/project");
|
|
7
|
+
* // returns "/home/user/project/src/index.ts"
|
|
8
|
+
*
|
|
9
|
+
* appendPath("/user/dev/app.ts", "/user/dev");
|
|
10
|
+
* // returns "/user/dev/app.ts"
|
|
8
11
|
* ```
|
|
9
12
|
*
|
|
10
13
|
* @param childPath - The child path to append to the {@link parentPath}
|
package/dist/append.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cwd as t}from"./cwd";import{isParentPath as n}from"./is-parent-path";import{joinPaths as p}from"./join-paths";import{slash as i}from"./slash";export function appendPath(r,o=t()){return i(n(r,o)?r:p(r
|
|
1
|
+
import{cwd as t}from"./cwd";import{isParentPath as n}from"./is-parent-path";import{joinPaths as p}from"./join-paths";import{slash as i}from"./slash";export function appendPath(r,o=t()){return i(n(r,o)?r:p(o,r))}export const append=appendPath;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stryke/path",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing various utilities that expand the functionality of NodeJs's built-in `path` module",
|
|
6
6
|
"repository": {
|
|
@@ -278,5 +278,5 @@
|
|
|
278
278
|
"main": "./dist/index.cjs",
|
|
279
279
|
"module": "./dist/index.mjs",
|
|
280
280
|
"types": "./dist/index.d.ts",
|
|
281
|
-
"gitHead": "
|
|
281
|
+
"gitHead": "e16d8342cedeaa690117587b41cfc439b61b38bb"
|
|
282
282
|
}
|