1 line
1.2 KiB
Plaintext
1 line
1.2 KiB
Plaintext
{"version":3,"file":"detectDefaults.mjs","sources":["../../../../src/assets/detections/parsers/detectDefaults.ts"],"sourcesContent":["import { ExtensionType } from '../../../extensions/Extensions';\n\nimport type { FormatDetectionParser } from '../types';\n\nconst imageFormats = ['png', 'jpg', 'jpeg'];\n\n/**\n * Adds some default image formats to the detection parser\n * @memberof assets\n */\nexport const detectDefaults = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: -1,\n },\n test: (): Promise<boolean> => Promise.resolve(true),\n add: async (formats) => [...formats, ...imageFormats],\n remove: async (formats) => formats.filter((f) => !imageFormats.includes(f)),\n} as FormatDetectionParser;\n"],"names":[],"mappings":";;;AAIA,MAAM,YAAe,GAAA,CAAC,KAAO,EAAA,KAAA,EAAO,MAAM,CAAA,CAAA;AAMnC,MAAM,cAAiB,GAAA;AAAA,EAC1B,SAAW,EAAA;AAAA,IACP,MAAM,aAAc,CAAA,eAAA;AAAA,IACpB,QAAU,EAAA,CAAA,CAAA;AAAA,GACd;AAAA,EACA,IAAM,EAAA,MAAwB,OAAQ,CAAA,OAAA,CAAQ,IAAI,CAAA;AAAA,EAClD,KAAK,OAAO,OAAA,KAAY,CAAC,GAAG,OAAA,EAAS,GAAG,YAAY,CAAA;AAAA,EACpD,MAAA,EAAQ,OAAO,OAAA,KAAY,OAAQ,CAAA,MAAA,CAAO,CAAC,CAAA,KAAM,CAAC,YAAA,CAAa,QAAS,CAAA,CAAC,CAAC,CAAA;AAC9E;;;;"} |