commonProgrammingFileExtensions
This function allows you to get an array of common text file extensions with or without the dot Common formats includes: js, ts, jsx, tsx, py, java, c, cpp, cs, php, rb, go, rs, swift, kt, dart, html, css, scss, sass, less, json, xml, sql, sh, bat, ps1, r, scala, clj, h, hpp, asp, jsp, cfm, pl, vb, class Extended formats includes: asm, awk, bas, boa, boo, cbl, cob, coffee, cr, d, diff, e, erl, ex, exs, f, f77, f90, f95, for, forth, fs, fsx, groovy, hs, iml, inc, io, jl, lisp, lsp, lua, m, ml, mli, nim, p, pas, patch, pike, pro, prolog, pyx, rkt, sc, scm, smalltalk, sml, st, tcl, v, vhd, vhdl, vim, ws, xsl, xslt, yacc, zig.
Params
- settings{}TCommonFileExtensionsSettings
Settings to customize the function behavior
Return
- -Array<String>
The array of extensions
Example
import { commonProgrammingFileExtensions } from '@blackbyte/sugar/extension';
const extensions = commonProgrammingFileExtensions();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