commonAudioFileExtensions
This function allows you to get an array of common text file extensions with or without the dot Common formats includes: mp3, wav, flac, aac, m4a, ogg, wma, opus, aiff, alac, ape, webm, ac3, dts, amr, mid, midi, cda, ra, au, voc, gsm, pcm Extended formats includes: 3gp, 8svx, aa, aax, ac4, act, aif, amv, awb, awg, bwf, caf, dct, dff, dsf, dss, dvf, dxd, eac3, ec3, flv, iklax, it, ivs, kar, la, m1a, m2a, m3u, m3u8, m4b, m4p, mka, mld, mlp, mmf, mod, mogg, mp2, mpa, mpc, mpp, mpu, msv, nmf, oga, ogm, ogv, ogx, pls, ram, raw, rax, rf64, rmi, s3m, saf, sd2, shn, sln, smp, snd, spx, tak, thd, tta, vox, vqf, w64, wax, wm, wmv, wpl, wv, wvx, xa, xm, xspf
Params
- settings{}TCommonFileExtensionsSettings
Settings to customize the function behavior
Return
- -Array<String>
The array of extensions
Example
import { commonAudioFileExtensions } from '@blackbyte/sugar/extension';
const extensions = commonAudioFileExtensions();Settings
- dotfalseboolean
If true, the dot will be added to the extension
- exclude{(‘esm’|‘cjs’)[]}Array<String>
An array of extensions to exclude
- extendedfalseboolean
If true, the extended formats will be included
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space