@stryke/path 0.6.0 → 0.6.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.
package/dist/slash.cjs CHANGED
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.slash = slash;
7
7
  function slash(r) {
8
- return r.replace(/\\/g, "/");
8
+ return r.startsWith("\\\\?\\") ? r : r.replace(/\\/g, "/");
9
9
  }
package/dist/slash.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Replace backslash to slash
3
3
  *
4
- * @param str - The string to replace
4
+ * @param path - The string to replace
5
5
  * @returns The string with replaced backslashes
6
6
  */
7
- export declare function slash(str: string): string;
7
+ export declare function slash(path: string): string;
package/dist/slash.mjs CHANGED
@@ -1 +1 @@
1
- export function slash(r){return r.replace(/\\/g,"/")}
1
+ export function slash(r){return r.startsWith("\\\\?\\")?r:r.replace(/\\/g,"/")}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/path",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
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": {