@bemoje/path 1.1.0 → 1.1.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.
Files changed (65) hide show
  1. package/lib/index.cjs +169 -105
  2. package/lib/index.d.cts +149 -16
  3. package/lib/index.d.ts +149 -16
  4. package/lib/index.js +153 -15
  5. package/package.json +95 -155
  6. package/lib/lib/cwd.cjs +0 -16
  7. package/lib/lib/cwd.d.cts +0 -11
  8. package/lib/lib/cwd.d.ts +0 -11
  9. package/lib/lib/cwd.js +0 -9
  10. package/lib/lib/dirnameDeep.cjs +0 -17
  11. package/lib/lib/dirnameDeep.d.cts +0 -9
  12. package/lib/lib/dirnameDeep.d.ts +0 -9
  13. package/lib/lib/dirnameDeep.js +0 -10
  14. package/lib/lib/hasBasename.cjs +0 -18
  15. package/lib/lib/hasBasename.d.cts +0 -8
  16. package/lib/lib/hasBasename.d.ts +0 -8
  17. package/lib/lib/hasBasename.js +0 -11
  18. package/lib/lib/hasExtname.cjs +0 -37
  19. package/lib/lib/hasExtname.d.cts +0 -15
  20. package/lib/lib/hasExtname.d.ts +0 -15
  21. package/lib/lib/hasExtname.js +0 -34
  22. package/lib/lib/hasParentDirname.cjs +0 -10
  23. package/lib/lib/hasParentDirname.d.cts +0 -6
  24. package/lib/lib/hasParentDirname.d.ts +0 -6
  25. package/lib/lib/hasParentDirname.js +0 -8
  26. package/lib/lib/isDotFile.cjs +0 -10
  27. package/lib/lib/isDotFile.d.cts +0 -8
  28. package/lib/lib/isDotFile.d.ts +0 -8
  29. package/lib/lib/isDotFile.js +0 -8
  30. package/lib/lib/isExtValid.cjs +0 -10
  31. package/lib/lib/isExtValid.d.cts +0 -13
  32. package/lib/lib/isExtValid.d.ts +0 -13
  33. package/lib/lib/isExtValid.js +0 -8
  34. package/lib/lib/isRelative.cjs +0 -16
  35. package/lib/lib/isRelative.d.cts +0 -6
  36. package/lib/lib/isRelative.d.ts +0 -6
  37. package/lib/lib/isRelative.js +0 -9
  38. package/lib/lib/isUnc.cjs +0 -10
  39. package/lib/lib/isUnc.d.cts +0 -8
  40. package/lib/lib/isUnc.d.ts +0 -8
  41. package/lib/lib/isUnc.js +0 -8
  42. package/lib/lib/isValidWin32.cjs +0 -27
  43. package/lib/lib/isValidWin32.d.cts +0 -11
  44. package/lib/lib/isValidWin32.d.ts +0 -11
  45. package/lib/lib/isValidWin32.js +0 -25
  46. package/lib/lib/prefixFilename.cjs +0 -18
  47. package/lib/lib/prefixFilename.d.cts +0 -11
  48. package/lib/lib/prefixFilename.d.ts +0 -11
  49. package/lib/lib/prefixFilename.js +0 -11
  50. package/lib/lib/root.cjs +0 -16
  51. package/lib/lib/root.d.cts +0 -6
  52. package/lib/lib/root.d.ts +0 -6
  53. package/lib/lib/root.js +0 -9
  54. package/lib/lib/suffixFilename.cjs +0 -18
  55. package/lib/lib/suffixFilename.d.cts +0 -11
  56. package/lib/lib/suffixFilename.d.ts +0 -11
  57. package/lib/lib/suffixFilename.js +0 -11
  58. package/lib/lib/toCwdRelative.cjs +0 -16
  59. package/lib/lib/toCwdRelative.d.cts +0 -8
  60. package/lib/lib/toCwdRelative.d.ts +0 -8
  61. package/lib/lib/toCwdRelative.js +0 -9
  62. package/lib/lib/toWin32.cjs +0 -10
  63. package/lib/lib/toWin32.d.cts +0 -6
  64. package/lib/lib/toWin32.d.ts +0 -6
  65. package/lib/lib/toWin32.js +0 -8
@@ -1,11 +0,0 @@
1
- import { __name } from '../chunk-SHUYVCID.js';
2
- import upath from 'upath';
3
-
4
- function hasBasename(tsFilepath, basenames) {
5
- return [
6
- basenames
7
- ].flat(2).includes(upath.basename(tsFilepath));
8
- }
9
- __name(hasBasename, "hasBasename");
10
-
11
- export { hasBasename };
@@ -1,37 +0,0 @@
1
- 'use strict';
2
-
3
- var fn = require('@mono/fn');
4
-
5
- var __defProp = Object.defineProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- function hasExtname(tsFilepath, extnames) {
8
- return new RegExp(`[.](${[
9
- extnames
10
- ].flat(2).join("|")})$`).test(tsFilepath);
11
- }
12
- __name(hasExtname, "hasExtname");
13
- hasExtname.js = fn.bindArg(hasExtname, 1, [
14
- "js",
15
- "mjs",
16
- "jsx",
17
- "cjs"
18
- ]);
19
- hasExtname.json = fn.bindArg(hasExtname, 1, [
20
- "json",
21
- "jsonc"
22
- ]);
23
- hasExtname.yaml = fn.bindArg(hasExtname, 1, [
24
- "yaml",
25
- "yml"
26
- ]);
27
- hasExtname.markdown = fn.bindArg(hasExtname, 1, [
28
- "md",
29
- "markdown"
30
- ]);
31
- hasExtname.ts = fn.bindArg(hasExtname, 1, [
32
- "ts",
33
- "mts",
34
- "tsx"
35
- ]);
36
-
37
- exports.hasExtname = hasExtname;
@@ -1,15 +0,0 @@
1
- import { A as Arrayable } from '../arrayable.d-1twOP8Y1.cjs';
2
-
3
- /**
4
- * Checks if a file path has any of the specified file extensions.
5
- */
6
- declare function hasExtname(tsFilepath: string, extnames: Arrayable<string>): boolean;
7
- declare namespace hasExtname {
8
- var js: (tsFilepath: string) => boolean;
9
- var json: (tsFilepath: string) => boolean;
10
- var yaml: (tsFilepath: string) => boolean;
11
- var markdown: (tsFilepath: string) => boolean;
12
- var ts: (tsFilepath: string) => boolean;
13
- }
14
-
15
- export { hasExtname };
@@ -1,15 +0,0 @@
1
- import { A as Arrayable } from '../arrayable.d-1twOP8Y1.js';
2
-
3
- /**
4
- * Checks if a file path has any of the specified file extensions.
5
- */
6
- declare function hasExtname(tsFilepath: string, extnames: Arrayable<string>): boolean;
7
- declare namespace hasExtname {
8
- var js: (tsFilepath: string) => boolean;
9
- var json: (tsFilepath: string) => boolean;
10
- var yaml: (tsFilepath: string) => boolean;
11
- var markdown: (tsFilepath: string) => boolean;
12
- var ts: (tsFilepath: string) => boolean;
13
- }
14
-
15
- export { hasExtname };
@@ -1,34 +0,0 @@
1
- import { __name } from '../chunk-SHUYVCID.js';
2
- import { bindArg } from '@mono/fn';
3
-
4
- function hasExtname(tsFilepath, extnames) {
5
- return new RegExp(`[.](${[
6
- extnames
7
- ].flat(2).join("|")})$`).test(tsFilepath);
8
- }
9
- __name(hasExtname, "hasExtname");
10
- hasExtname.js = bindArg(hasExtname, 1, [
11
- "js",
12
- "mjs",
13
- "jsx",
14
- "cjs"
15
- ]);
16
- hasExtname.json = bindArg(hasExtname, 1, [
17
- "json",
18
- "jsonc"
19
- ]);
20
- hasExtname.yaml = bindArg(hasExtname, 1, [
21
- "yaml",
22
- "yml"
23
- ]);
24
- hasExtname.markdown = bindArg(hasExtname, 1, [
25
- "md",
26
- "markdown"
27
- ]);
28
- hasExtname.ts = bindArg(hasExtname, 1, [
29
- "ts",
30
- "mts",
31
- "tsx"
32
- ]);
33
-
34
- export { hasExtname };
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- function hasParentDirname(fspath, name) {
6
- return new RegExp(`(^|[/\\\\])${name}[/\\\\]`).test(fspath);
7
- }
8
- __name(hasParentDirname, "hasParentDirname");
9
-
10
- exports.hasParentDirname = hasParentDirname;
@@ -1,6 +0,0 @@
1
- /**
2
- * Whether fspath is a subpath of a parent directory with the given name.
3
- */
4
- declare function hasParentDirname(fspath: string, name: string): boolean;
5
-
6
- export { hasParentDirname };
@@ -1,6 +0,0 @@
1
- /**
2
- * Whether fspath is a subpath of a parent directory with the given name.
3
- */
4
- declare function hasParentDirname(fspath: string, name: string): boolean;
5
-
6
- export { hasParentDirname };
@@ -1,8 +0,0 @@
1
- import { __name } from '../chunk-SHUYVCID.js';
2
-
3
- function hasParentDirname(fspath, name) {
4
- return new RegExp(`(^|[/\\\\])${name}[/\\\\]`).test(fspath);
5
- }
6
- __name(hasParentDirname, "hasParentDirname");
7
-
8
- export { hasParentDirname };
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- function isDotFile(filepath) {
6
- return /(?:^|[/\\])(\.(?!\.)[^/\\]+)$/.test(filepath);
7
- }
8
- __name(isDotFile, "isDotFile");
9
-
10
- exports.isDotFile = isDotFile;
@@ -1,8 +0,0 @@
1
- /**
2
- * Determines if a given filepath is a dotfile.
3
- * @param filepath - The filepath to evaluate.
4
- * @returns A boolean indicating whether the filepath is a dotfile.
5
- */
6
- declare function isDotFile(filepath: string): boolean;
7
-
8
- export { isDotFile };
@@ -1,8 +0,0 @@
1
- /**
2
- * Determines if a given filepath is a dotfile.
3
- * @param filepath - The filepath to evaluate.
4
- * @returns A boolean indicating whether the filepath is a dotfile.
5
- */
6
- declare function isDotFile(filepath: string): boolean;
7
-
8
- export { isDotFile };
@@ -1,8 +0,0 @@
1
- import { __name } from '../chunk-SHUYVCID.js';
2
-
3
- function isDotFile(filepath) {
4
- return /(?:^|[/\\])(\.(?!\.)[^/\\]+)$/.test(filepath);
5
- }
6
- __name(isDotFile, "isDotFile");
7
-
8
- export { isDotFile };
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- function isExtValid(ext) {
6
- return !!ext && ext !== "." && !/["*:<>?|]/.test(ext);
7
- }
8
- __name(isExtValid, "isExtValid");
9
-
10
- exports.isExtValid = isExtValid;
@@ -1,13 +0,0 @@
1
- /**
2
- * Check if a file extension is valid.
3
- *
4
- * Invalid:
5
- * - empty string
6
- * - single dot: "."
7
- * - illegal characters: <>"|?*:
8
- *
9
- * @param ext - The file extension to check.
10
- */
11
- declare function isExtValid(ext: string): boolean;
12
-
13
- export { isExtValid };
@@ -1,13 +0,0 @@
1
- /**
2
- * Check if a file extension is valid.
3
- *
4
- * Invalid:
5
- * - empty string
6
- * - single dot: "."
7
- * - illegal characters: <>"|?*:
8
- *
9
- * @param ext - The file extension to check.
10
- */
11
- declare function isExtValid(ext: string): boolean;
12
-
13
- export { isExtValid };
@@ -1,8 +0,0 @@
1
- import { __name } from '../chunk-SHUYVCID.js';
2
-
3
- function isExtValid(ext) {
4
- return !!ext && ext !== "." && !/["*:<>?|]/.test(ext);
5
- }
6
- __name(isExtValid, "isExtValid");
7
-
8
- export { isExtValid };
@@ -1,16 +0,0 @@
1
- 'use strict';
2
-
3
- var path = require('path');
4
-
5
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
6
-
7
- var path__default = /*#__PURE__*/_interopDefault(path);
8
-
9
- var __defProp = Object.defineProperty;
10
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
11
- function isRelative(p) {
12
- return !path__default.default.isAbsolute(p);
13
- }
14
- __name(isRelative, "isRelative");
15
-
16
- exports.isRelative = isRelative;
@@ -1,6 +0,0 @@
1
- /**
2
- * Whether a path is a relative string, ie. not absolute.
3
- */
4
- declare function isRelative(p: string): boolean;
5
-
6
- export { isRelative };
@@ -1,6 +0,0 @@
1
- /**
2
- * Whether a path is a relative string, ie. not absolute.
3
- */
4
- declare function isRelative(p: string): boolean;
5
-
6
- export { isRelative };
@@ -1,9 +0,0 @@
1
- import { __name } from '../chunk-SHUYVCID.js';
2
- import path from 'path';
3
-
4
- function isRelative(p) {
5
- return !path.isAbsolute(p);
6
- }
7
- __name(isRelative, "isRelative");
8
-
9
- export { isRelative };
package/lib/lib/isUnc.cjs DELETED
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- function isUnc(filepath) {
6
- return /^[/\\]{2,}[^/\\]+[/\\]+[^/\\]+/.test(filepath);
7
- }
8
- __name(isUnc, "isUnc");
9
-
10
- exports.isUnc = isUnc;
@@ -1,8 +0,0 @@
1
- /**
2
- * Determines if a given filepath is a UNC path.
3
- * @param filepath - The filepath to evaluate.
4
- * @returns A boolean indicating whether the filepath is a UNC path.
5
- */
6
- declare function isUnc(filepath: string): boolean;
7
-
8
- export { isUnc };
@@ -1,8 +0,0 @@
1
- /**
2
- * Determines if a given filepath is a UNC path.
3
- * @param filepath - The filepath to evaluate.
4
- * @returns A boolean indicating whether the filepath is a UNC path.
5
- */
6
- declare function isUnc(filepath: string): boolean;
7
-
8
- export { isUnc };
package/lib/lib/isUnc.js DELETED
@@ -1,8 +0,0 @@
1
- import { __name } from '../chunk-SHUYVCID.js';
2
-
3
- function isUnc(filepath) {
4
- return /^[/\\]{2,}[^/\\]+[/\\]+[^/\\]+/.test(filepath);
5
- }
6
- __name(isUnc, "isUnc");
7
-
8
- export { isUnc };
@@ -1,27 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- function isValidWin32(path, options) {
6
- if (path.length === 0) {
7
- return false;
8
- }
9
- if (path.includes("/") && path.includes("\\")) {
10
- return false;
11
- }
12
- const maxLength = (options && options.extendedMaxLength ? 32767 : 260) - 12;
13
- if (path.length > maxLength) {
14
- return false;
15
- }
16
- const noDriveLetter = /^\w:(\\|\/)/g.test(path) ? path.substring(2) : path;
17
- if (/["*:<>?|]/g.test(noDriveLetter)) {
18
- return false;
19
- }
20
- if (/(\\|\/)(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])((\\|\/)|$)/g.test(path)) {
21
- return false;
22
- }
23
- return true;
24
- }
25
- __name(isValidWin32, "isValidWin32");
26
-
27
- exports.isValidWin32 = isValidWin32;
@@ -1,11 +0,0 @@
1
- /**
2
- * Check whether a provided windows filesystem path string is valid according to:
3
- * https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
4
- * @param path The path to validate.
5
- * @throws If the path is invalid and the `assert` option is true.
6
- */
7
- declare function isValidWin32(path: string, options?: {
8
- extendedMaxLength?: boolean;
9
- }): boolean;
10
-
11
- export { isValidWin32 };
@@ -1,11 +0,0 @@
1
- /**
2
- * Check whether a provided windows filesystem path string is valid according to:
3
- * https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
4
- * @param path The path to validate.
5
- * @throws If the path is invalid and the `assert` option is true.
6
- */
7
- declare function isValidWin32(path: string, options?: {
8
- extendedMaxLength?: boolean;
9
- }): boolean;
10
-
11
- export { isValidWin32 };
@@ -1,25 +0,0 @@
1
- import { __name } from '../chunk-SHUYVCID.js';
2
-
3
- function isValidWin32(path, options) {
4
- if (path.length === 0) {
5
- return false;
6
- }
7
- if (path.includes("/") && path.includes("\\")) {
8
- return false;
9
- }
10
- const maxLength = (options && options.extendedMaxLength ? 32767 : 260) - 12;
11
- if (path.length > maxLength) {
12
- return false;
13
- }
14
- const noDriveLetter = /^\w:(\\|\/)/g.test(path) ? path.substring(2) : path;
15
- if (/["*:<>?|]/g.test(noDriveLetter)) {
16
- return false;
17
- }
18
- if (/(\\|\/)(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])((\\|\/)|$)/g.test(path)) {
19
- return false;
20
- }
21
- return true;
22
- }
23
- __name(isValidWin32, "isValidWin32");
24
-
25
- export { isValidWin32 };
@@ -1,18 +0,0 @@
1
- 'use strict';
2
-
3
- var upath = require('upath');
4
-
5
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
6
-
7
- var upath__default = /*#__PURE__*/_interopDefault(upath);
8
-
9
- var __defProp = Object.defineProperty;
10
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
11
- function prefixFilename(filePath, prefix) {
12
- const ext = upath__default.default.extname(filePath);
13
- const fileNameWithoutExt = upath__default.default.basename(filePath, ext);
14
- return upath__default.default.joinSafe(upath__default.default.dirname(filePath), prefix + fileNameWithoutExt + ext);
15
- }
16
- __name(prefixFilename, "prefixFilename");
17
-
18
- exports.prefixFilename = prefixFilename;
@@ -1,11 +0,0 @@
1
- /**
2
- * Append string to the beginning of the filename.
3
- *
4
- * @example ```ts
5
- * path.fileNameWithPrefix('path/to/file-name.ext', 'new-')
6
- * // => path/to/new-file-name.ext
7
- * ```
8
- */
9
- declare function prefixFilename(filePath: string, prefix: string): string;
10
-
11
- export { prefixFilename };
@@ -1,11 +0,0 @@
1
- /**
2
- * Append string to the beginning of the filename.
3
- *
4
- * @example ```ts
5
- * path.fileNameWithPrefix('path/to/file-name.ext', 'new-')
6
- * // => path/to/new-file-name.ext
7
- * ```
8
- */
9
- declare function prefixFilename(filePath: string, prefix: string): string;
10
-
11
- export { prefixFilename };
@@ -1,11 +0,0 @@
1
- import { __name } from '../chunk-SHUYVCID.js';
2
- import upath from 'upath';
3
-
4
- function prefixFilename(filePath, prefix) {
5
- const ext = upath.extname(filePath);
6
- const fileNameWithoutExt = upath.basename(filePath, ext);
7
- return upath.joinSafe(upath.dirname(filePath), prefix + fileNameWithoutExt + ext);
8
- }
9
- __name(prefixFilename, "prefixFilename");
10
-
11
- export { prefixFilename };
package/lib/lib/root.cjs DELETED
@@ -1,16 +0,0 @@
1
- 'use strict';
2
-
3
- var upath = require('upath');
4
-
5
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
6
-
7
- var upath__default = /*#__PURE__*/_interopDefault(upath);
8
-
9
- var __defProp = Object.defineProperty;
10
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
11
- function root(p) {
12
- return upath__default.default.parse(p).root;
13
- }
14
- __name(root, "root");
15
-
16
- exports.root = root;
@@ -1,6 +0,0 @@
1
- /**
2
- * Returns the root directory of a given path.
3
- */
4
- declare function root(p: string): string;
5
-
6
- export { root };
package/lib/lib/root.d.ts DELETED
@@ -1,6 +0,0 @@
1
- /**
2
- * Returns the root directory of a given path.
3
- */
4
- declare function root(p: string): string;
5
-
6
- export { root };
package/lib/lib/root.js DELETED
@@ -1,9 +0,0 @@
1
- import { __name } from '../chunk-SHUYVCID.js';
2
- import upath from 'upath';
3
-
4
- function root(p) {
5
- return upath.parse(p).root;
6
- }
7
- __name(root, "root");
8
-
9
- export { root };
@@ -1,18 +0,0 @@
1
- 'use strict';
2
-
3
- var upath = require('upath');
4
-
5
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
6
-
7
- var upath__default = /*#__PURE__*/_interopDefault(upath);
8
-
9
- var __defProp = Object.defineProperty;
10
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
11
- function suffixFilename(filePath, suffix) {
12
- const split = upath__default.default.basename(filePath).split(".");
13
- split[0] += suffix;
14
- return upath__default.default.joinSafe(upath__default.default.dirname(filePath), split.join("."));
15
- }
16
- __name(suffixFilename, "suffixFilename");
17
-
18
- exports.suffixFilename = suffixFilename;
@@ -1,11 +0,0 @@
1
- /**
2
- * Append string to the end of the filename.
3
- *
4
- * @example ```ts
5
- * path.suffixFilename('path/to/file-name.ext', '-old')
6
- * // => path/to/file-name-old.ext
7
- * ```
8
- */
9
- declare function suffixFilename(filePath: string, suffix: string): string;
10
-
11
- export { suffixFilename };
@@ -1,11 +0,0 @@
1
- /**
2
- * Append string to the end of the filename.
3
- *
4
- * @example ```ts
5
- * path.suffixFilename('path/to/file-name.ext', '-old')
6
- * // => path/to/file-name-old.ext
7
- * ```
8
- */
9
- declare function suffixFilename(filePath: string, suffix: string): string;
10
-
11
- export { suffixFilename };
@@ -1,11 +0,0 @@
1
- import { __name } from '../chunk-SHUYVCID.js';
2
- import upath from 'upath';
3
-
4
- function suffixFilename(filePath, suffix) {
5
- const split = upath.basename(filePath).split(".");
6
- split[0] += suffix;
7
- return upath.joinSafe(upath.dirname(filePath), split.join("."));
8
- }
9
- __name(suffixFilename, "suffixFilename");
10
-
11
- export { suffixFilename };
@@ -1,16 +0,0 @@
1
- 'use strict';
2
-
3
- var upath = require('upath');
4
-
5
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
6
-
7
- var upath__default = /*#__PURE__*/_interopDefault(upath);
8
-
9
- var __defProp = Object.defineProperty;
10
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
11
- function toCwdRelative(p) {
12
- return upath__default.default.relative(process.cwd(), p);
13
- }
14
- __name(toCwdRelative, "toCwdRelative");
15
-
16
- exports.toCwdRelative = toCwdRelative;
@@ -1,8 +0,0 @@
1
- /**
2
- * Solve the relative path from the process.cwd() path to the {p} path.
3
- * At times we have two absolute paths, and we need to derive the relative path from one to the other.
4
- * This is actually the reverse transform of path.resolve.
5
- */
6
- declare function toCwdRelative(p: string): string;
7
-
8
- export { toCwdRelative };
@@ -1,8 +0,0 @@
1
- /**
2
- * Solve the relative path from the process.cwd() path to the {p} path.
3
- * At times we have two absolute paths, and we need to derive the relative path from one to the other.
4
- * This is actually the reverse transform of path.resolve.
5
- */
6
- declare function toCwdRelative(p: string): string;
7
-
8
- export { toCwdRelative };
@@ -1,9 +0,0 @@
1
- import { __name } from '../chunk-SHUYVCID.js';
2
- import upath from 'upath';
3
-
4
- function toCwdRelative(p) {
5
- return upath.relative(process.cwd(), p);
6
- }
7
- __name(toCwdRelative, "toCwdRelative");
8
-
9
- export { toCwdRelative };
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- function toWin32(p) {
6
- return p.replaceAll("/", "\\");
7
- }
8
- __name(toWin32, "toWin32");
9
-
10
- exports.toWin32 = toWin32;
@@ -1,6 +0,0 @@
1
- /**
2
- * Ensures win32 backslashes are used instead of forward slashes.
3
- */
4
- declare function toWin32(p: string): string;
5
-
6
- export { toWin32 };
@@ -1,6 +0,0 @@
1
- /**
2
- * Ensures win32 backslashes are used instead of forward slashes.
3
- */
4
- declare function toWin32(p: string): string;
5
-
6
- export { toWin32 };
@@ -1,8 +0,0 @@
1
- import { __name } from '../chunk-SHUYVCID.js';
2
-
3
- function toWin32(p) {
4
- return p.replaceAll("/", "\\");
5
- }
6
- __name(toWin32, "toWin32");
7
-
8
- export { toWin32 };