commonTextFileExtensions
This function allows you to get an array of common text file extensions with or without the dot Common formats includes: txt, htm, html, md, json, csv, rss, xhtml, xml, log, rtf, doc, docx, odt, pdf, tex, latex, readme, changelog, license, yaml, yml, ini, cfg, conf, properties Extended formats includes: asc, asciidoc, adoc, rst, textile, wiki, mediawiki, creole, pod, texi, texinfo, info, man, nroff, troff, groff, me, ms, mm, sgml, sgm, dtd, ent, mod, xsd, rng, rnc, xsl, xslt, fo, dita, ditamap, ditaval, docbook, dbk, fb2, opf, ncx, epub, mobi, azw, azw3, kf8, pdb, lit, lrf, rb, tcr, pml, prc, imp, ebk, tr2, tr3, tomeraider
Params
- settings{}TCommonFileExtensionsSettings
Settings to customize the function behavior
Return
- -Array<String>
The array of extensions
Example
import { commonTextFileExtensions } from '@blackbyte/sugar/extension';
const extensions = commonTextFileExtensions();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