commonAudioFileExtensions

Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.extension

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

  1. settings{}TCommonFileExtensionsSettings

    Settings to customize the function behavior

Return

  1. -Array<String>

    The array of extensions

Example

import { commonAudioFileExtensions } from '@blackbyte/sugar/extension';
const extensions = commonAudioFileExtensions();

Settings

  1. dotfalseboolean

    If true, the dot will be added to the extension

  2. exclude{(‘esm’|‘cjs’)[]}Array<String>

    An array of extensions to exclude

  3. extendedfalseboolean

    If true, the extended formats will be included