shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
commonImageFileExtensions
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: jpg, jpeg, png, gif, bmp, svg, webp, ico, tiff, tif Extended formats includes: psd, ai, ps, avif, heic, heif, raw, cr2, nef, orf, sr2, arw, dng, rw2, raf, pef, x3f, crw, mrw, dcr, kdc, srf, erf, 3fr, mef, mos, ptx, r3d, fff, iiq, rwl, rwz, bay, cap, dcs, dcx, eip, emf, eps, exr, fax, fpx, g3, hdr, img, j2c, j2k, jp2, jpc, jpf, jpx.
Params
- settings{}TCommonFileExtensionsSettings
Settings to customize the function behavior
Return
- -Array<String>
The array of extensions
Example
import { commonImageFileExtensions } from '@blackbyte/sugar/extension';
const extensions = commonImageFileExtensions();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