{"version":3,"file":"index.cjs","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":"gFAOA,MAAMA,MAAY,QAEX,SAASC,KAAYC,EAAyB,CAClD,MAAMC,EAAM,IAAI,OAAOD,CAAK,EAC5B,OAAAF,EAAM,IAAIG,EAAKD,CAAK,EACbC,CACV,CAEO,SAASC,EAAWC,EAAiC,CACzD,OAAOA,aAAiB,QAAUL,EAAM,IAAIK,CAAK,CACpD,CAEO,SAASC,EAAQD,EAAyB,CAC9C,OAAOL,EAAM,IAAIK,CAAK,GAAK,CAAA,CAC9B"}