@photostructure/fs-metadata 0.3.0 → 0.3.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/src/linux/mtab.ts CHANGED
@@ -92,7 +92,7 @@ export function parseMtab(content: string): MountEntry[] {
92
92
 
93
93
  const fields = line
94
94
  .trim()
95
- .match(/(?:[^\s\\]+|\\.)+/g)
95
+ .match(/(?:[^\s\\]|\\.)+/g)
96
96
  ?.map(decodeEscapeSequences);
97
97
 
98
98
  if (!fields || fields.length < 3) {
package/src/string.ts CHANGED
@@ -53,7 +53,7 @@ export function decodeEscapeSequences(input: string): string {
53
53
  });
54
54
  }
55
55
 
56
- const AlphaNumericRE = /[a-z0-9.-_]/i;
56
+ const AlphaNumericRE = /[/\w.-]/;
57
57
 
58
58
  export function encodeEscapeSequences(input: string): string {
59
59
  return input
@@ -17,6 +17,14 @@ export function describePlatform(...supported: NodeJS.Platform[]) {
17
17
  return supported.includes(platform) ? describe : describe.skip;
18
18
  }
19
19
 
20
+ export function skipItIf(skipped: NodeJS.Platform[]): jest.It {
21
+ return skipped.includes(platform) ? it.skip : it;
22
+ }
23
+
24
+ export function runItIf(included: NodeJS.Platform[]): jest.It {
25
+ return included.includes(platform) ? it : it.skip;
26
+ }
27
+
20
28
  export function systemDrive() {
21
29
  if (isWindows) {
22
30
  return normalizePath(