@bemoje/path 1.1.1 → 1.1.3

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 (64) hide show
  1. package/README.md +23 -22
  2. package/lib/index.d.cts +149 -16
  3. package/lib/index.d.ts +149 -16
  4. package/package.json +20 -220
  5. package/lib/lib/cwd.cjs +0 -16
  6. package/lib/lib/cwd.d.cts +0 -11
  7. package/lib/lib/cwd.d.ts +0 -11
  8. package/lib/lib/cwd.js +0 -10
  9. package/lib/lib/dirnameDeep.cjs +0 -17
  10. package/lib/lib/dirnameDeep.d.cts +0 -9
  11. package/lib/lib/dirnameDeep.d.ts +0 -9
  12. package/lib/lib/dirnameDeep.js +0 -11
  13. package/lib/lib/hasBasename.cjs +0 -18
  14. package/lib/lib/hasBasename.d.cts +0 -8
  15. package/lib/lib/hasBasename.d.ts +0 -8
  16. package/lib/lib/hasBasename.js +0 -12
  17. package/lib/lib/hasExtname.cjs +0 -60
  18. package/lib/lib/hasExtname.d.cts +0 -15
  19. package/lib/lib/hasExtname.d.ts +0 -15
  20. package/lib/lib/hasExtname.js +0 -58
  21. package/lib/lib/hasParentDirname.cjs +0 -12
  22. package/lib/lib/hasParentDirname.d.cts +0 -6
  23. package/lib/lib/hasParentDirname.d.ts +0 -6
  24. package/lib/lib/hasParentDirname.js +0 -10
  25. package/lib/lib/isDotFile.cjs +0 -12
  26. package/lib/lib/isDotFile.d.cts +0 -8
  27. package/lib/lib/isDotFile.d.ts +0 -8
  28. package/lib/lib/isDotFile.js +0 -10
  29. package/lib/lib/isExtValid.cjs +0 -12
  30. package/lib/lib/isExtValid.d.cts +0 -13
  31. package/lib/lib/isExtValid.d.ts +0 -13
  32. package/lib/lib/isExtValid.js +0 -10
  33. package/lib/lib/isRelative.cjs +0 -16
  34. package/lib/lib/isRelative.d.cts +0 -6
  35. package/lib/lib/isRelative.d.ts +0 -6
  36. package/lib/lib/isRelative.js +0 -10
  37. package/lib/lib/isUnc.cjs +0 -12
  38. package/lib/lib/isUnc.d.cts +0 -8
  39. package/lib/lib/isUnc.d.ts +0 -8
  40. package/lib/lib/isUnc.js +0 -10
  41. package/lib/lib/isValidWin32.cjs +0 -29
  42. package/lib/lib/isValidWin32.d.cts +0 -11
  43. package/lib/lib/isValidWin32.d.ts +0 -11
  44. package/lib/lib/isValidWin32.js +0 -27
  45. package/lib/lib/prefixFilename.cjs +0 -18
  46. package/lib/lib/prefixFilename.d.cts +0 -11
  47. package/lib/lib/prefixFilename.d.ts +0 -11
  48. package/lib/lib/prefixFilename.js +0 -12
  49. package/lib/lib/root.cjs +0 -16
  50. package/lib/lib/root.d.cts +0 -6
  51. package/lib/lib/root.d.ts +0 -6
  52. package/lib/lib/root.js +0 -10
  53. package/lib/lib/suffixFilename.cjs +0 -18
  54. package/lib/lib/suffixFilename.d.cts +0 -11
  55. package/lib/lib/suffixFilename.d.ts +0 -11
  56. package/lib/lib/suffixFilename.js +0 -12
  57. package/lib/lib/toCwdRelative.cjs +0 -16
  58. package/lib/lib/toCwdRelative.d.cts +0 -8
  59. package/lib/lib/toCwdRelative.d.ts +0 -8
  60. package/lib/lib/toCwdRelative.js +0 -10
  61. package/lib/lib/toWin32.cjs +0 -12
  62. package/lib/lib/toWin32.d.cts +0 -6
  63. package/lib/lib/toWin32.d.ts +0 -6
  64. package/lib/lib/toWin32.js +0 -10
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,10 +0,0 @@
1
- import upath from 'upath';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- function root(p) {
6
- return upath.parse(p).root;
7
- }
8
- __name(root, "root");
9
-
10
- 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,12 +0,0 @@
1
- import upath from 'upath';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- function suffixFilename(filePath, suffix) {
6
- const split = upath.basename(filePath).split(".");
7
- split[0] += suffix;
8
- return upath.joinSafe(upath.dirname(filePath), split.join("."));
9
- }
10
- __name(suffixFilename, "suffixFilename");
11
-
12
- 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,10 +0,0 @@
1
- import upath from 'upath';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- function toCwdRelative(p) {
6
- return upath.relative(process.cwd(), p);
7
- }
8
- __name(toCwdRelative, "toCwdRelative");
9
-
10
- export { toCwdRelative };
@@ -1,12 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
-
6
- // src/lib/toWin32.ts
7
- function toWin32(p) {
8
- return p.replaceAll("/", "\\");
9
- }
10
- __name(toWin32, "toWin32");
11
-
12
- 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,10 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // src/lib/toWin32.ts
5
- function toWin32(p) {
6
- return p.replaceAll("/", "\\");
7
- }
8
- __name(toWin32, "toWin32");
9
-
10
- export { toWin32 };