{"version":3,"file":"index.mjs","sources":["../src/pathspec.ts"],"sourcesContent":["/**\n * Wraps one or more file paths in an object that `parseCli` recognises as\n * explicit pathspecs, routing them to `ParsedCLI.paths` regardless of whether\n * a `--` separator token is present.\n */\n\n// biome-ignore lint/complexity/noBannedTypes: <Uses String object to satisfy WeakMap requiremetn>\nconst cache = new WeakMap<String, string[]>();\n\nexport function pathspec(...paths: string[]): string {\n   const key = new String(paths);\n   cache.set(key, paths);\n   return key as string;\n}\n\nexport function isPathSpec(value: unknown): value is string {\n   return value instanceof String && cache.has(value);\n}\n\nexport function toPaths(value: string): string[] {\n   return cache.get(value) ?? [];\n}\n"],"names":["cache","pathspec","paths","key","isPathSpec","value","toPaths"],"mappings":"AAOA,MAAMA,wBAAY,QAAA;AAEX,SAASC,KAAYC,GAAyB;AAClD,QAAMC,IAAM,IAAI,OAAOD,CAAK;AAC5B,SAAAF,EAAM,IAAIG,GAAKD,CAAK,GACbC;AACV;AAEO,SAASC,EAAWC,GAAiC;AACzD,SAAOA,aAAiB,UAAUL,EAAM,IAAIK,CAAK;AACpD;AAEO,SAASC,EAAQD,GAAyB;AAC9C,SAAOL,EAAM,IAAIK,CAAK,KAAK,CAAA;AAC9B;"}