shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
commonCompressedFileExtensions
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: zip, rar, 7z, tar, gz, ‘targz, tgz, bz2, ‘tarbz2, tbz2, xz, ‘tarxz, txz, iso, dmg, cab, deb, rpm, pkg, jar, war, apk Extended formats includes: ace, alz, arc, arj, bz, cpio, egg, lha, lz, lzh, lzma, lzo, pak, sit, sitx, ‘tar.lz’, ‘tar.Z’, tbz, tlz, tz, tZ, wim, xar, z, zipx
Params
- settings{}TCommonFileExtensionsSettings
Settings to customize the function behavior
Return
- -Array<String>
The array of extensions
Example
import { commonCompressedFileExtensions } from '@blackbyte/sugar/extension';
const extensions = commonCompressedFileExtensions();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