@stryke/path 0.24.4 → 0.25.1

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 (85) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/append.cjs +59 -1
  3. package/dist/append.mjs +57 -1
  4. package/dist/append.mjs.map +1 -1
  5. package/dist/asset-extensions.cjs +40 -1
  6. package/dist/asset-extensions.mjs +39 -1
  7. package/dist/asset-extensions.mjs.map +1 -1
  8. package/dist/common.cjs +34 -1
  9. package/dist/common.mjs +34 -1
  10. package/dist/common.mjs.map +1 -1
  11. package/dist/correct-path.cjs +176 -1
  12. package/dist/correct-path.mjs +169 -1
  13. package/dist/correct-path.mjs.map +1 -1
  14. package/dist/cwd.cjs +17 -1
  15. package/dist/cwd.mjs +16 -1
  16. package/dist/cwd.mjs.map +1 -1
  17. package/dist/delimiter.cjs +27 -1
  18. package/dist/delimiter.mjs +24 -1
  19. package/dist/delimiter.mjs.map +1 -1
  20. package/dist/file-path-fns.cjs +332 -1
  21. package/dist/file-path-fns.mjs +311 -1
  22. package/dist/file-path-fns.mjs.map +1 -1
  23. package/dist/find.cjs +24 -1
  24. package/dist/find.mjs +3 -1
  25. package/dist/glob-to-regex.cjs +97 -0
  26. package/dist/glob-to-regex.d.cts +50 -0
  27. package/dist/glob-to-regex.d.cts.map +1 -0
  28. package/dist/glob-to-regex.d.mts +50 -0
  29. package/dist/glob-to-regex.d.mts.map +1 -0
  30. package/dist/glob-to-regex.mjs +98 -0
  31. package/dist/glob-to-regex.mjs.map +1 -0
  32. package/dist/index.cjs +73 -1
  33. package/dist/index.d.cts +2 -1
  34. package/dist/index.d.mts +2 -1
  35. package/dist/index.mjs +17 -1
  36. package/dist/is-parent-path.cjs +32 -1
  37. package/dist/is-parent-path.mjs +32 -1
  38. package/dist/is-parent-path.mjs.map +1 -1
  39. package/dist/is-root-dir.cjs +14 -1
  40. package/dist/is-root-dir.mjs +13 -1
  41. package/dist/is-root-dir.mjs.map +1 -1
  42. package/dist/is-type.cjs +92 -1
  43. package/dist/is-type.mjs +87 -1
  44. package/dist/is-type.mjs.map +1 -1
  45. package/dist/join-paths.cjs +108 -1
  46. package/dist/join-paths.mjs +107 -1
  47. package/dist/join-paths.mjs.map +1 -1
  48. package/dist/join.cjs +4 -1
  49. package/dist/join.mjs +3 -1
  50. package/dist/normalize.cjs +10 -1
  51. package/dist/normalize.mjs +3 -1
  52. package/dist/regex.cjs +20 -1
  53. package/dist/regex.mjs +12 -1
  54. package/dist/regex.mjs.map +1 -1
  55. package/dist/replace.cjs +44 -1
  56. package/dist/replace.mjs +43 -1
  57. package/dist/replace.mjs.map +1 -1
  58. package/dist/resolve-parent-path.cjs +18 -1
  59. package/dist/resolve-parent-path.mjs +18 -1
  60. package/dist/resolve-parent-path.mjs.map +1 -1
  61. package/dist/slash.cjs +27 -1
  62. package/dist/slash.mjs +26 -1
  63. package/dist/slash.mjs.map +1 -1
  64. package/dist/type-checks/src/is-empty.cjs +20 -1
  65. package/dist/type-checks/src/is-empty.mjs +20 -1
  66. package/dist/type-checks/src/is-empty.mjs.map +1 -1
  67. package/dist/type-checks/src/is-null.cjs +12 -1
  68. package/dist/type-checks/src/is-null.mjs +11 -1
  69. package/dist/type-checks/src/is-null.mjs.map +1 -1
  70. package/dist/type-checks/src/is-set-string.cjs +20 -1
  71. package/dist/type-checks/src/is-set-string.mjs +20 -1
  72. package/dist/type-checks/src/is-set-string.mjs.map +1 -1
  73. package/dist/type-checks/src/is-set.cjs +19 -1
  74. package/dist/type-checks/src/is-set.mjs +19 -1
  75. package/dist/type-checks/src/is-set.mjs.map +1 -1
  76. package/dist/type-checks/src/is-string.cjs +12 -1
  77. package/dist/type-checks/src/is-string.mjs +11 -1
  78. package/dist/type-checks/src/is-string.mjs.map +1 -1
  79. package/dist/type-checks/src/is-undefined.cjs +8 -1
  80. package/dist/type-checks/src/is-undefined.mjs +7 -1
  81. package/dist/type-checks/src/is-undefined.mjs.map +1 -1
  82. package/dist/types/src/base.cjs +6 -1
  83. package/dist/types/src/base.mjs +5 -1
  84. package/dist/types/src/base.mjs.map +1 -1
  85. package/package.json +9 -5
@@ -1 +1 @@
1
- {"version":3,"file":"regex.mjs","names":[],"sources":["../src/regex.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const DRIVE_LETTER_START_REGEX = /^[A-Z]:\\//i;\nexport const DRIVE_LETTER_REGEX = /^[A-Z]:$/i;\n\nexport const UNC_REGEX = /^[/\\\\]{2}/;\n\nexport const ABSOLUTE_PATH_REGEX =\n /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^~[/\\\\]|^[A-Z]:[/\\\\]/i;\n\nexport const ROOT_FOLDER_REGEX = /^\\/([A-Z]:)?$/i;\n\nexport const FILE_EXTENSION_REGEX = /\\.[0-9a-z]+$/i;\n\nexport const PACKAGE_PATH_REGEX = /^@\\w+\\/.*$/;\nexport const NPM_SCOPED_PACKAGE_REGEX = /^(?:@[\\w-]+\\/)?[\\w-]+$/;\n"],"mappings":"AAkBA,MAAa,EAA2B,aAC3B,EAAqB,YAErB,EAAY,YAEZ,EACX,wDAEW,EAAoB,iBAEpB,EAAuB,gBAEvB,EAAqB,aACrB,EAA2B"}
1
+ {"version":3,"file":"regex.mjs","names":[],"sources":["../src/regex.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const DRIVE_LETTER_START_REGEX = /^[A-Z]:\\//i;\nexport const DRIVE_LETTER_REGEX = /^[A-Z]:$/i;\n\nexport const UNC_REGEX = /^[/\\\\]{2}/;\n\nexport const ABSOLUTE_PATH_REGEX =\n /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^~[/\\\\]|^[A-Z]:[/\\\\]/i;\n\nexport const ROOT_FOLDER_REGEX = /^\\/([A-Z]:)?$/i;\n\nexport const FILE_EXTENSION_REGEX = /\\.[0-9a-z]+$/i;\n\nexport const PACKAGE_PATH_REGEX = /^@\\w+\\/.*$/;\nexport const NPM_SCOPED_PACKAGE_REGEX = /^(?:@[\\w-]+\\/)?[\\w-]+$/;\n"],"mappings":";AAkBA,MAAa,2BAA2B;AACxC,MAAa,qBAAqB;AAElC,MAAa,YAAY;AAEzB,MAAa,sBACX;AAEF,MAAa,oBAAoB;AAEjC,MAAa,uBAAuB;AAEpC,MAAa,qBAAqB;AAClC,MAAa,2BAA2B"}
package/dist/replace.cjs CHANGED
@@ -1 +1,44 @@
1
- const e=require(`./cwd.cjs`),t=require(`./slash.cjs`),n=require(`./is-parent-path.cjs`),r=require(`./file-path-fns.cjs`);function i(r,i=e.cwd()){return n.isParentPath(r,i)?t.slash(r).replace(t.slash(i),``).replace(/^\//,``):r}function a(e,t=``){return e.replace(!t||t.includes(`.`)?r.findFileDotExtensionSafe(e):r.findFileExtensionSafe(e),t)}exports.replaceExtension=a,exports.replacePath=i;
1
+ const require_cwd = require('./cwd.cjs');
2
+ const require_slash = require('./slash.cjs');
3
+ const require_is_parent_path = require('./is-parent-path.cjs');
4
+ const require_file_path_fns = require('./file-path-fns.cjs');
5
+
6
+ //#region src/replace.ts
7
+ /**
8
+ * Replace the base path from the beginning of the given path.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * replacePath("/home/user/project/src/index.ts", "/home/user/project");
13
+ * // returns "src/index.ts"
14
+ * ```
15
+ *
16
+ * @param childPath - The child path to replace the {@link parentPath} substring from
17
+ * @param parentPath - The parent path to remove from the {@link childPath} parameter
18
+ * @returns The {@link childPath} with the {@link parentPath} path removed
19
+ */
20
+ function replacePath(childPath, parentPath = require_cwd.cwd()) {
21
+ return require_is_parent_path.isParentPath(childPath, parentPath) ? require_slash.slash(childPath).replace(require_slash.slash(parentPath), "").replace(/^\//, "") : childPath;
22
+ }
23
+ /**
24
+ * Replace the extension of a given path with the provided value.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * replaceExtension("/home/user/project/src/index.ts", ".js");
29
+ * // returns "/home/user/project/src/index.js"
30
+ * replaceExtension("/home/user/project/src/index.ts");
31
+ * // returns "/home/user/project/src/index"
32
+ * ```
33
+ *
34
+ * @param path - The path that will have its current extension replaced
35
+ * @param replacement - The value (or an empty string) to replace the current extension with
36
+ * @returns The path with the replaced extension
37
+ */
38
+ function replaceExtension(path, replacement = "") {
39
+ return path.replace(!replacement || replacement.includes(".") ? require_file_path_fns.findFileDotExtensionSafe(path) : require_file_path_fns.findFileExtensionSafe(path), replacement);
40
+ }
41
+
42
+ //#endregion
43
+ exports.replaceExtension = replaceExtension;
44
+ exports.replacePath = replacePath;
package/dist/replace.mjs CHANGED
@@ -1,2 +1,44 @@
1
- import{cwd as e}from"./cwd.mjs";import{slash as t}from"./slash.mjs";import{isParentPath as n}from"./is-parent-path.mjs";import{findFileDotExtensionSafe as r,findFileExtensionSafe as i}from"./file-path-fns.mjs";function a(r,i=e()){return n(r,i)?t(r).replace(t(i),``).replace(/^\//,``):r}function o(e,t=``){return e.replace(!t||t.includes(`.`)?r(e):i(e),t)}export{o as replaceExtension,a as replacePath};
1
+ import { cwd } from "./cwd.mjs";
2
+ import { slash } from "./slash.mjs";
3
+ import { isParentPath } from "./is-parent-path.mjs";
4
+ import { findFileDotExtensionSafe, findFileExtensionSafe } from "./file-path-fns.mjs";
5
+
6
+ //#region src/replace.ts
7
+ /**
8
+ * Replace the base path from the beginning of the given path.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * replacePath("/home/user/project/src/index.ts", "/home/user/project");
13
+ * // returns "src/index.ts"
14
+ * ```
15
+ *
16
+ * @param childPath - The child path to replace the {@link parentPath} substring from
17
+ * @param parentPath - The parent path to remove from the {@link childPath} parameter
18
+ * @returns The {@link childPath} with the {@link parentPath} path removed
19
+ */
20
+ function replacePath(childPath, parentPath = cwd()) {
21
+ return isParentPath(childPath, parentPath) ? slash(childPath).replace(slash(parentPath), "").replace(/^\//, "") : childPath;
22
+ }
23
+ /**
24
+ * Replace the extension of a given path with the provided value.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * replaceExtension("/home/user/project/src/index.ts", ".js");
29
+ * // returns "/home/user/project/src/index.js"
30
+ * replaceExtension("/home/user/project/src/index.ts");
31
+ * // returns "/home/user/project/src/index"
32
+ * ```
33
+ *
34
+ * @param path - The path that will have its current extension replaced
35
+ * @param replacement - The value (or an empty string) to replace the current extension with
36
+ * @returns The path with the replaced extension
37
+ */
38
+ function replaceExtension(path, replacement = "") {
39
+ return path.replace(!replacement || replacement.includes(".") ? findFileDotExtensionSafe(path) : findFileExtensionSafe(path), replacement);
40
+ }
41
+
42
+ //#endregion
43
+ export { replaceExtension, replacePath };
2
44
  //# sourceMappingURL=replace.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"replace.mjs","names":[],"sources":["../src/replace.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { cwd } from \"./cwd\";\nimport {\n findFileDotExtensionSafe,\n findFileExtensionSafe\n} from \"./file-path-fns\";\nimport { isParentPath } from \"./is-parent-path\";\nimport { slash } from \"./slash\";\n\n/**\n * Replace the base path from the beginning of the given path.\n *\n * @example\n * ```ts\n * replacePath(\"/home/user/project/src/index.ts\", \"/home/user/project\");\n * // returns \"src/index.ts\"\n * ```\n *\n * @param childPath - The child path to replace the {@link parentPath} substring from\n * @param parentPath - The parent path to remove from the {@link childPath} parameter\n * @returns The {@link childPath} with the {@link parentPath} path removed\n */\nexport function replacePath(\n childPath: string,\n parentPath: string = cwd()\n): string {\n return isParentPath(childPath, parentPath)\n ? slash(childPath).replace(slash(parentPath), \"\").replace(/^\\//, \"\")\n : childPath;\n}\n\n/**\n * Replace the extension of a given path with the provided value.\n *\n * @example\n * ```ts\n * replaceExtension(\"/home/user/project/src/index.ts\", \".js\");\n * // returns \"/home/user/project/src/index.js\"\n * replaceExtension(\"/home/user/project/src/index.ts\");\n * // returns \"/home/user/project/src/index\"\n * ```\n *\n * @param path - The path that will have its current extension replaced\n * @param replacement - The value (or an empty string) to replace the current extension with\n * @returns The path with the replaced extension\n */\nexport function replaceExtension(path: string, replacement = \"\"): string {\n return path.replace(\n !replacement || replacement.includes(\".\")\n ? findFileDotExtensionSafe(path)\n : findFileExtensionSafe(path),\n replacement\n );\n}\n"],"mappings":"kNAuCA,SAAgB,EACd,EACA,EAAqB,GAAK,CAClB,CACR,OAAO,EAAa,EAAW,EAAW,CACtC,EAAM,EAAU,CAAC,QAAQ,EAAM,EAAW,CAAE,GAAG,CAAC,QAAQ,MAAO,GAAG,CAClE,EAkBN,SAAgB,EAAiB,EAAc,EAAc,GAAY,CACvE,OAAO,EAAK,QACV,CAAC,GAAe,EAAY,SAAS,IAAI,CACrC,EAAyB,EAAK,CAC9B,EAAsB,EAAK,CAC/B,EACD"}
1
+ {"version":3,"file":"replace.mjs","names":[],"sources":["../src/replace.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { cwd } from \"./cwd\";\nimport {\n findFileDotExtensionSafe,\n findFileExtensionSafe\n} from \"./file-path-fns\";\nimport { isParentPath } from \"./is-parent-path\";\nimport { slash } from \"./slash\";\n\n/**\n * Replace the base path from the beginning of the given path.\n *\n * @example\n * ```ts\n * replacePath(\"/home/user/project/src/index.ts\", \"/home/user/project\");\n * // returns \"src/index.ts\"\n * ```\n *\n * @param childPath - The child path to replace the {@link parentPath} substring from\n * @param parentPath - The parent path to remove from the {@link childPath} parameter\n * @returns The {@link childPath} with the {@link parentPath} path removed\n */\nexport function replacePath(\n childPath: string,\n parentPath: string = cwd()\n): string {\n return isParentPath(childPath, parentPath)\n ? slash(childPath).replace(slash(parentPath), \"\").replace(/^\\//, \"\")\n : childPath;\n}\n\n/**\n * Replace the extension of a given path with the provided value.\n *\n * @example\n * ```ts\n * replaceExtension(\"/home/user/project/src/index.ts\", \".js\");\n * // returns \"/home/user/project/src/index.js\"\n * replaceExtension(\"/home/user/project/src/index.ts\");\n * // returns \"/home/user/project/src/index\"\n * ```\n *\n * @param path - The path that will have its current extension replaced\n * @param replacement - The value (or an empty string) to replace the current extension with\n * @returns The path with the replaced extension\n */\nexport function replaceExtension(path: string, replacement = \"\"): string {\n return path.replace(\n !replacement || replacement.includes(\".\")\n ? findFileDotExtensionSafe(path)\n : findFileExtensionSafe(path),\n replacement\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAuCA,SAAgB,YACd,WACA,aAAqB,KAAK,EAClB;AACR,QAAO,aAAa,WAAW,WAAW,GACtC,MAAM,UAAU,CAAC,QAAQ,MAAM,WAAW,EAAE,GAAG,CAAC,QAAQ,OAAO,GAAG,GAClE;;;;;;;;;;;;;;;;;AAkBN,SAAgB,iBAAiB,MAAc,cAAc,IAAY;AACvE,QAAO,KAAK,QACV,CAAC,eAAe,YAAY,SAAS,IAAI,GACrC,yBAAyB,KAAK,GAC9B,sBAAsB,KAAK,EAC/B,YACD"}
@@ -1 +1,18 @@
1
- const e=require(`./join-paths.cjs`),t=(t,n=1)=>{let r=t.replaceAll(/\/+$/g,``);for(let t=0;t<n;t++)r=e.joinPaths(r,`..`);return r};exports.resolveParentPath=t;
1
+ const require_join_paths = require('./join-paths.cjs');
2
+
3
+ //#region src/resolve-parent-path.ts
4
+ /**
5
+ * Resolve the parent path of the provided path.
6
+ *
7
+ * @param path - The path to resolve.
8
+ * @param count - The number of parent directories to traverse.
9
+ * @returns The parent path of the provided path.
10
+ */
11
+ const resolveParentPath = (path, count = 1) => {
12
+ let parentPath = path.replaceAll(/\/+$/g, "");
13
+ for (let i = 0; i < count; i++) parentPath = require_join_paths.joinPaths(parentPath, "..");
14
+ return parentPath;
15
+ };
16
+
17
+ //#endregion
18
+ exports.resolveParentPath = resolveParentPath;
@@ -1,2 +1,19 @@
1
- import{joinPaths as e}from"./join-paths.mjs";const t=(t,n=1)=>{let r=t.replaceAll(/\/+$/g,``);for(let t=0;t<n;t++)r=e(r,`..`);return r};export{t as resolveParentPath};
1
+ import { joinPaths } from "./join-paths.mjs";
2
+
3
+ //#region src/resolve-parent-path.ts
4
+ /**
5
+ * Resolve the parent path of the provided path.
6
+ *
7
+ * @param path - The path to resolve.
8
+ * @param count - The number of parent directories to traverse.
9
+ * @returns The parent path of the provided path.
10
+ */
11
+ const resolveParentPath = (path, count = 1) => {
12
+ let parentPath = path.replaceAll(/\/+$/g, "");
13
+ for (let i = 0; i < count; i++) parentPath = joinPaths(parentPath, "..");
14
+ return parentPath;
15
+ };
16
+
17
+ //#endregion
18
+ export { resolveParentPath };
2
19
  //# sourceMappingURL=resolve-parent-path.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-parent-path.mjs","names":[],"sources":["../src/resolve-parent-path.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"./join-paths\";\n\n/**\n * Resolve the parent path of the provided path.\n *\n * @param path - The path to resolve.\n * @param count - The number of parent directories to traverse.\n * @returns The parent path of the provided path.\n */\nexport const resolveParentPath = (path: string, count: number = 1): string => {\n let parentPath = path.replaceAll(/\\/+$/g, \"\");\n for (let i = 0; i < count; i++) {\n parentPath = joinPaths(parentPath, \"..\");\n }\n return parentPath;\n};\n"],"mappings":"6CA2BA,MAAa,GAAqB,EAAc,EAAgB,IAAc,CAC5E,IAAI,EAAa,EAAK,WAAW,QAAS,GAAG,CAC7C,IAAK,IAAI,EAAI,EAAG,EAAI,EAAO,IACzB,EAAa,EAAU,EAAY,KAAK,CAE1C,OAAO"}
1
+ {"version":3,"file":"resolve-parent-path.mjs","names":[],"sources":["../src/resolve-parent-path.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"./join-paths\";\n\n/**\n * Resolve the parent path of the provided path.\n *\n * @param path - The path to resolve.\n * @param count - The number of parent directories to traverse.\n * @returns The parent path of the provided path.\n */\nexport const resolveParentPath = (path: string, count: number = 1): string => {\n let parentPath = path.replaceAll(/\\/+$/g, \"\");\n for (let i = 0; i < count; i++) {\n parentPath = joinPaths(parentPath, \"..\");\n }\n return parentPath;\n};\n"],"mappings":";;;;;;;;;;AA2BA,MAAa,qBAAqB,MAAc,QAAgB,MAAc;CAC5E,IAAI,aAAa,KAAK,WAAW,SAAS,GAAG;AAC7C,MAAK,IAAI,IAAI,GAAG,IAAI,OAAO,IACzB,cAAa,UAAU,YAAY,KAAK;AAE1C,QAAO"}
package/dist/slash.cjs CHANGED
@@ -1 +1,27 @@
1
- const e=require(`./is-type.cjs`);function t(e){return e.startsWith(`\\\\?\\`)?e:e.replace(/\\/g,`/`)}function n(n){let r=t(n);return e.isAbsolutePath(r)?r.replace(/\/+$/g,``):r.replace(/^\.\//g,``).replace(/\/+$/g,``)}exports.formatSlash=n,exports.slash=t;
1
+ const require_is_type = require('./is-type.cjs');
2
+
3
+ //#region src/slash.ts
4
+ /**
5
+ * Replace backslash to slash
6
+ *
7
+ * @param path - The string to replace
8
+ * @returns The string with replaced backslashes
9
+ */
10
+ function slash(path) {
11
+ if (path.startsWith("\\\\?\\")) return path;
12
+ return path.replace(/\\/g, "/");
13
+ }
14
+ /**
15
+ * Replace backslash to slash and remove unneeded leading and trailing slashes
16
+ *
17
+ * @param path - The string to replace
18
+ * @returns The string with replaced backslashes
19
+ */
20
+ function formatSlash(path) {
21
+ const formatted = slash(path);
22
+ return require_is_type.isAbsolutePath(formatted) ? formatted.replace(/\/+$/g, "") : formatted.replace(/^\.\//g, "").replace(/\/+$/g, "");
23
+ }
24
+
25
+ //#endregion
26
+ exports.formatSlash = formatSlash;
27
+ exports.slash = slash;
package/dist/slash.mjs CHANGED
@@ -1,2 +1,27 @@
1
- import{isAbsolutePath as e}from"./is-type.mjs";function t(e){return e.startsWith(`\\\\?\\`)?e:e.replace(/\\/g,`/`)}function n(n){let r=t(n);return e(r)?r.replace(/\/+$/g,``):r.replace(/^\.\//g,``).replace(/\/+$/g,``)}export{n as formatSlash,t as slash};
1
+ import { isAbsolutePath } from "./is-type.mjs";
2
+
3
+ //#region src/slash.ts
4
+ /**
5
+ * Replace backslash to slash
6
+ *
7
+ * @param path - The string to replace
8
+ * @returns The string with replaced backslashes
9
+ */
10
+ function slash(path) {
11
+ if (path.startsWith("\\\\?\\")) return path;
12
+ return path.replace(/\\/g, "/");
13
+ }
14
+ /**
15
+ * Replace backslash to slash and remove unneeded leading and trailing slashes
16
+ *
17
+ * @param path - The string to replace
18
+ * @returns The string with replaced backslashes
19
+ */
20
+ function formatSlash(path) {
21
+ const formatted = slash(path);
22
+ return isAbsolutePath(formatted) ? formatted.replace(/\/+$/g, "") : formatted.replace(/^\.\//g, "").replace(/\/+$/g, "");
23
+ }
24
+
25
+ //#endregion
26
+ export { formatSlash, slash };
2
27
  //# sourceMappingURL=slash.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"slash.mjs","names":[],"sources":["../src/slash.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isAbsolutePath } from \"./is-type\";\n\n/**\n * Replace backslash to slash\n *\n * @param path - The string to replace\n * @returns The string with replaced backslashes\n */\nexport function slash(path: string) {\n if (path.startsWith(\"\\\\\\\\?\\\\\")) {\n return path;\n }\n\n return path.replace(/\\\\/g, \"/\");\n}\n\n/**\n * Replace backslash to slash and remove unneeded leading and trailing slashes\n *\n * @param path - The string to replace\n * @returns The string with replaced backslashes\n */\nexport function formatSlash(path: string) {\n const formatted = slash(path);\n\n return isAbsolutePath(formatted)\n ? formatted.replace(/\\/+$/g, \"\")\n : formatted.replace(/^\\.\\//g, \"\").replace(/\\/+$/g, \"\");\n}\n"],"mappings":"+CA0BA,SAAgB,EAAM,EAAc,CAKlC,OAJI,EAAK,WAAW,UAAU,CACrB,EAGF,EAAK,QAAQ,MAAO,IAAI,CASjC,SAAgB,EAAY,EAAc,CACxC,IAAM,EAAY,EAAM,EAAK,CAE7B,OAAO,EAAe,EAAU,CAC5B,EAAU,QAAQ,QAAS,GAAG,CAC9B,EAAU,QAAQ,SAAU,GAAG,CAAC,QAAQ,QAAS,GAAG"}
1
+ {"version":3,"file":"slash.mjs","names":[],"sources":["../src/slash.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isAbsolutePath } from \"./is-type\";\n\n/**\n * Replace backslash to slash\n *\n * @param path - The string to replace\n * @returns The string with replaced backslashes\n */\nexport function slash(path: string) {\n if (path.startsWith(\"\\\\\\\\?\\\\\")) {\n return path;\n }\n\n return path.replace(/\\\\/g, \"/\");\n}\n\n/**\n * Replace backslash to slash and remove unneeded leading and trailing slashes\n *\n * @param path - The string to replace\n * @returns The string with replaced backslashes\n */\nexport function formatSlash(path: string) {\n const formatted = slash(path);\n\n return isAbsolutePath(formatted)\n ? formatted.replace(/\\/+$/g, \"\")\n : formatted.replace(/^\\.\\//g, \"\").replace(/\\/+$/g, \"\");\n}\n"],"mappings":";;;;;;;;;AA0BA,SAAgB,MAAM,MAAc;AAClC,KAAI,KAAK,WAAW,UAAU,CAC5B,QAAO;AAGT,QAAO,KAAK,QAAQ,OAAO,IAAI;;;;;;;;AASjC,SAAgB,YAAY,MAAc;CACxC,MAAM,YAAY,MAAM,KAAK;AAE7B,QAAO,eAAe,UAAU,GAC5B,UAAU,QAAQ,SAAS,GAAG,GAC9B,UAAU,QAAQ,UAAU,GAAG,CAAC,QAAQ,SAAS,GAAG"}
@@ -1 +1,20 @@
1
- const e=require(`./is-null.cjs`),t=require(`./is-undefined.cjs`),n=n=>{try{return t.isUndefined(n)||e.isNull(n)}catch{return!1}};exports.isEmpty=n;
1
+ const require_is_null = require('./is-null.cjs');
2
+ const require_is_undefined = require('./is-undefined.cjs');
3
+
4
+ //#region ../type-checks/src/is-empty.ts
5
+ /**
6
+ * Check if the provided value's type is `null` or `undefined`
7
+ *
8
+ * @param value - The value to type check
9
+ * @returns An indicator specifying if the value provided is of type `null` or `undefined`
10
+ */
11
+ const isEmpty = (value) => {
12
+ try {
13
+ return require_is_undefined.isUndefined(value) || require_is_null.isNull(value);
14
+ } catch {
15
+ return false;
16
+ }
17
+ };
18
+
19
+ //#endregion
20
+ exports.isEmpty = isEmpty;
@@ -1,2 +1,21 @@
1
- import{isNull as e}from"./is-null.mjs";import{isUndefined as t}from"./is-undefined.mjs";const n=n=>{try{return t(n)||e(n)}catch{return!1}};export{n as isEmpty};
1
+ import { isNull } from "./is-null.mjs";
2
+ import { isUndefined } from "./is-undefined.mjs";
3
+
4
+ //#region ../type-checks/src/is-empty.ts
5
+ /**
6
+ * Check if the provided value's type is `null` or `undefined`
7
+ *
8
+ * @param value - The value to type check
9
+ * @returns An indicator specifying if the value provided is of type `null` or `undefined`
10
+ */
11
+ const isEmpty = (value) => {
12
+ try {
13
+ return isUndefined(value) || isNull(value);
14
+ } catch {
15
+ return false;
16
+ }
17
+ };
18
+
19
+ //#endregion
20
+ export { isEmpty };
2
21
  //# sourceMappingURL=is-empty.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-empty.mjs","names":[],"sources":["../../../../type-checks/src/is-empty.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isDate } from \"./is-date\";\nimport { isFunction } from \"./is-function\";\nimport { isNull } from \"./is-null\";\nimport { isNumber } from \"./is-number\";\nimport { isSymbol } from \"./is-symbol\";\nimport { isUndefined } from \"./is-undefined\";\n\n/**\n * Check if the provided value's type is `null` or `undefined`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `null` or `undefined`\n */\nexport const isEmpty = (value: unknown) => {\n try {\n return isUndefined(value) || isNull(value);\n } catch {\n return false;\n }\n};\n\nexport const isEmptyAnything = (value: any) => {\n if (value === true || value === false) return true;\n if (value === null || value === undefined) return true;\n if (isNumber(value)) return value === 0;\n if (isDate(value)) return Number.isNaN(value.getTime());\n if (isFunction(value)) return false;\n if (isSymbol(value)) return false;\n const { length } = value;\n if (isNumber(length)) return length === 0;\n const { size } = value;\n if (isNumber(size)) return size === 0;\n const keys = Object.keys(value).length;\n\n return keys === 0;\n};\n"],"mappings":"wFA+BA,MAAa,EAAW,GAAmB,CACzC,GAAI,CACF,OAAO,EAAY,EAAM,EAAI,EAAO,EAAM,MACpC,CACN,MAAO"}
1
+ {"version":3,"file":"is-empty.mjs","names":[],"sources":["../../../../type-checks/src/is-empty.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isDate } from \"./is-date\";\nimport { isFunction } from \"./is-function\";\nimport { isNull } from \"./is-null\";\nimport { isNumber } from \"./is-number\";\nimport { isSymbol } from \"./is-symbol\";\nimport { isUndefined } from \"./is-undefined\";\n\n/**\n * Check if the provided value's type is `null` or `undefined`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `null` or `undefined`\n */\nexport const isEmpty = (value: unknown) => {\n try {\n return isUndefined(value) || isNull(value);\n } catch {\n return false;\n }\n};\n\nexport const isEmptyAnything = (value: any) => {\n if (value === true || value === false) return true;\n if (value === null || value === undefined) return true;\n if (isNumber(value)) return value === 0;\n if (isDate(value)) return Number.isNaN(value.getTime());\n if (isFunction(value)) return false;\n if (isSymbol(value)) return false;\n const { length } = value;\n if (isNumber(length)) return length === 0;\n const { size } = value;\n if (isNumber(size)) return size === 0;\n const keys = Object.keys(value).length;\n\n return keys === 0;\n};\n"],"mappings":";;;;;;;;;;AA+BA,MAAa,WAAW,UAAmB;AACzC,KAAI;AACF,SAAO,YAAY,MAAM,IAAI,OAAO,MAAM;SACpC;AACN,SAAO"}
@@ -1 +1,12 @@
1
- const e=e=>{try{return e===null}catch{return!1}};exports.isNull=e;
1
+
2
+ //#region ../type-checks/src/is-null.ts
3
+ const isNull = (value) => {
4
+ try {
5
+ return value === null;
6
+ } catch {
7
+ return false;
8
+ }
9
+ };
10
+
11
+ //#endregion
12
+ exports.isNull = isNull;
@@ -1,2 +1,12 @@
1
- const e=e=>{try{return e===null}catch{return!1}};export{e as isNull};
1
+ //#region ../type-checks/src/is-null.ts
2
+ const isNull = (value) => {
3
+ try {
4
+ return value === null;
5
+ } catch {
6
+ return false;
7
+ }
8
+ };
9
+
10
+ //#endregion
11
+ export { isNull };
2
12
  //# sourceMappingURL=is-null.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-null.mjs","names":[],"sources":["../../../../type-checks/src/is-null.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const isNull = (value: unknown): value is null => {\n try {\n return value === null;\n } catch {\n return false;\n }\n};\n"],"mappings":"AAkBA,MAAa,EAAU,GAAkC,CACvD,GAAI,CACF,OAAO,IAAU,UACX,CACN,MAAO"}
1
+ {"version":3,"file":"is-null.mjs","names":[],"sources":["../../../../type-checks/src/is-null.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const isNull = (value: unknown): value is null => {\n try {\n return value === null;\n } catch {\n return false;\n }\n};\n"],"mappings":";AAkBA,MAAa,UAAU,UAAkC;AACvD,KAAI;AACF,SAAO,UAAU;SACX;AACN,SAAO"}
@@ -1 +1,20 @@
1
- const e=require(`./is-set.cjs`),t=require(`./is-string.cjs`),n=n=>{try{return e.isSet(n)&&t.isString(n)&&n.length>0}catch{return!1}};exports.isSetString=n;
1
+ const require_is_set = require('./is-set.cjs');
2
+ const require_is_string = require('./is-string.cjs');
3
+
4
+ //#region ../type-checks/src/is-set-string.ts
5
+ /**
6
+ * Determine if the type is string and is not empty (length greater than zero)
7
+ *
8
+ * @param value - The value to type check
9
+ * @returns An indicator specifying if the value provided is of type `string` and length greater than zero
10
+ */
11
+ const isSetString = (value) => {
12
+ try {
13
+ return require_is_set.isSet(value) && require_is_string.isString(value) && value.length > 0;
14
+ } catch {
15
+ return false;
16
+ }
17
+ };
18
+
19
+ //#endregion
20
+ exports.isSetString = isSetString;
@@ -1,2 +1,21 @@
1
- import{isSet as e}from"./is-set.mjs";import{isString as t}from"./is-string.mjs";const n=n=>{try{return e(n)&&t(n)&&n.length>0}catch{return!1}};export{n as isSetString};
1
+ import { isSet } from "./is-set.mjs";
2
+ import { isString } from "./is-string.mjs";
3
+
4
+ //#region ../type-checks/src/is-set-string.ts
5
+ /**
6
+ * Determine if the type is string and is not empty (length greater than zero)
7
+ *
8
+ * @param value - The value to type check
9
+ * @returns An indicator specifying if the value provided is of type `string` and length greater than zero
10
+ */
11
+ const isSetString = (value) => {
12
+ try {
13
+ return isSet(value) && isString(value) && value.length > 0;
14
+ } catch {
15
+ return false;
16
+ }
17
+ };
18
+
19
+ //#endregion
20
+ export { isSetString };
2
21
  //# sourceMappingURL=is-set-string.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-set-string.mjs","names":[],"sources":["../../../../type-checks/src/is-set-string.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isSet } from \"./is-set\";\nimport { isString } from \"./is-string\";\n\n/**\n * Determine if the type is string and is not empty (length greater than zero)\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `string` and length greater than zero\n */\nexport const isSetString = (value: unknown): value is NonNullable<string> => {\n try {\n return isSet(value) && isString(value) && value.length > 0;\n } catch {\n return false;\n }\n};\n"],"mappings":"gFA2BA,MAAa,EAAe,GAAiD,CAC3E,GAAI,CACF,OAAO,EAAM,EAAM,EAAI,EAAS,EAAM,EAAI,EAAM,OAAS,OACnD,CACN,MAAO"}
1
+ {"version":3,"file":"is-set-string.mjs","names":[],"sources":["../../../../type-checks/src/is-set-string.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isSet } from \"./is-set\";\nimport { isString } from \"./is-string\";\n\n/**\n * Determine if the type is string and is not empty (length greater than zero)\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `string` and length greater than zero\n */\nexport const isSetString = (value: unknown): value is NonNullable<string> => {\n try {\n return isSet(value) && isString(value) && value.length > 0;\n } catch {\n return false;\n }\n};\n"],"mappings":";;;;;;;;;;AA2BA,MAAa,eAAe,UAAiD;AAC3E,KAAI;AACF,SAAO,MAAM,MAAM,IAAI,SAAS,MAAM,IAAI,MAAM,SAAS;SACnD;AACN,SAAO"}
@@ -1 +1,19 @@
1
- const e=require(`./is-empty.cjs`),t=t=>{try{return!e.isEmpty(t)}catch{return!1}};exports.isSet=t;
1
+ const require_is_empty = require('./is-empty.cjs');
2
+
3
+ //#region ../type-checks/src/is-set.ts
4
+ /**
5
+ * The inverse of the `isEmpty` function
6
+ *
7
+ * @param value - The value to type check
8
+ * @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`
9
+ */
10
+ const isSet = (value) => {
11
+ try {
12
+ return !require_is_empty.isEmpty(value);
13
+ } catch {
14
+ return false;
15
+ }
16
+ };
17
+
18
+ //#endregion
19
+ exports.isSet = isSet;
@@ -1,2 +1,20 @@
1
- import{isEmpty as e}from"./is-empty.mjs";const t=t=>{try{return!e(t)}catch{return!1}};export{t as isSet};
1
+ import { isEmpty } from "./is-empty.mjs";
2
+
3
+ //#region ../type-checks/src/is-set.ts
4
+ /**
5
+ * The inverse of the `isEmpty` function
6
+ *
7
+ * @param value - The value to type check
8
+ * @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`
9
+ */
10
+ const isSet = (value) => {
11
+ try {
12
+ return !isEmpty(value);
13
+ } catch {
14
+ return false;
15
+ }
16
+ };
17
+
18
+ //#endregion
19
+ export { isSet };
2
20
  //# sourceMappingURL=is-set.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-set.mjs","names":[],"sources":["../../../../type-checks/src/is-set.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isEmpty } from \"./is-empty\";\n\n/**\n * The inverse of the `isEmpty` function\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`\n */\nexport const isSet = (value: unknown): value is NonNullable<unknown> => {\n try {\n return !isEmpty(value);\n } catch {\n return false;\n }\n};\n"],"mappings":"yCA0BA,MAAa,EAAS,GAAkD,CACtE,GAAI,CACF,MAAO,CAAC,EAAQ,EAAM,MAChB,CACN,MAAO"}
1
+ {"version":3,"file":"is-set.mjs","names":[],"sources":["../../../../type-checks/src/is-set.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isEmpty } from \"./is-empty\";\n\n/**\n * The inverse of the `isEmpty` function\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`\n */\nexport const isSet = (value: unknown): value is NonNullable<unknown> => {\n try {\n return !isEmpty(value);\n } catch {\n return false;\n }\n};\n"],"mappings":";;;;;;;;;AA0BA,MAAa,SAAS,UAAkD;AACtE,KAAI;AACF,SAAO,CAAC,QAAQ,MAAM;SAChB;AACN,SAAO"}
@@ -1 +1,12 @@
1
- const e=e=>{try{return typeof e==`string`}catch{return!1}};exports.isString=e;
1
+
2
+ //#region ../type-checks/src/is-string.ts
3
+ const isString = (value) => {
4
+ try {
5
+ return typeof value === "string";
6
+ } catch {
7
+ return false;
8
+ }
9
+ };
10
+
11
+ //#endregion
12
+ exports.isString = isString;
@@ -1,2 +1,12 @@
1
- const e=e=>{try{return typeof e==`string`}catch{return!1}};export{e as isString};
1
+ //#region ../type-checks/src/is-string.ts
2
+ const isString = (value) => {
3
+ try {
4
+ return typeof value === "string";
5
+ } catch {
6
+ return false;
7
+ }
8
+ };
9
+
10
+ //#endregion
11
+ export { isString };
2
12
  //# sourceMappingURL=is-string.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-string.mjs","names":[],"sources":["../../../../type-checks/src/is-string.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const isString = (value: unknown): value is string => {\n try {\n return typeof value === \"string\";\n } catch {\n return false;\n }\n};\n"],"mappings":"AAkBA,MAAa,EAAY,GAAoC,CAC3D,GAAI,CACF,OAAO,OAAO,GAAU,cAClB,CACN,MAAO"}
1
+ {"version":3,"file":"is-string.mjs","names":[],"sources":["../../../../type-checks/src/is-string.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const isString = (value: unknown): value is string => {\n try {\n return typeof value === \"string\";\n } catch {\n return false;\n }\n};\n"],"mappings":";AAkBA,MAAa,YAAY,UAAoC;AAC3D,KAAI;AACF,SAAO,OAAO,UAAU;SAClB;AACN,SAAO"}
@@ -1 +1,8 @@
1
- const e=e=>e===void 0;exports.isUndefined=e;
1
+
2
+ //#region ../type-checks/src/is-undefined.ts
3
+ const isUndefined = (value) => {
4
+ return value === void 0;
5
+ };
6
+
7
+ //#endregion
8
+ exports.isUndefined = isUndefined;
@@ -1,2 +1,8 @@
1
- const e=e=>e===void 0;export{e as isUndefined};
1
+ //#region ../type-checks/src/is-undefined.ts
2
+ const isUndefined = (value) => {
3
+ return value === void 0;
4
+ };
5
+
6
+ //#endregion
7
+ export { isUndefined };
2
8
  //# sourceMappingURL=is-undefined.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-undefined.mjs","names":[],"sources":["../../../../type-checks/src/is-undefined.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const isUndefined = (value: unknown): value is undefined => {\n return value === undefined;\n};\n"],"mappings":"AAkBA,MAAa,EAAe,GACnB,IAAU,IAAA"}
1
+ {"version":3,"file":"is-undefined.mjs","names":[],"sources":["../../../../type-checks/src/is-undefined.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const isUndefined = (value: unknown): value is undefined => {\n return value === undefined;\n};\n"],"mappings":";AAkBA,MAAa,eAAe,UAAuC;AACjE,QAAO,UAAU"}
@@ -1 +1,6 @@
1
- const e=``;exports.EMPTY_STRING=``;
1
+
2
+ //#region ../types/src/base.ts
3
+ const EMPTY_STRING = "";
4
+
5
+ //#endregion
6
+ exports.EMPTY_STRING = EMPTY_STRING;
@@ -1,2 +1,6 @@
1
- const e=``;export{e as EMPTY_STRING};
1
+ //#region ../types/src/base.ts
2
+ const EMPTY_STRING = "";
3
+
4
+ //#endregion
5
+ export { EMPTY_STRING };
2
6
  //# sourceMappingURL=base.mjs.map