commonWebFileExtensions
This function allows you to get an array of common text file extensions with or without the dot Common formats includes: html, htm, css, js, php, asp, jsp, py, rb, pl, cgi, cfm, xml, json, rss, xhtml, ts, jsx, tsx, scss, sass, less, vue, svelte Extended formats includes: aspx, ashx, asmx, axd, do, action, faces, xhtml, jspx, tag, tld, erb, rhtml, haml, slim, ejs, hbs, handlebars, mustache, twig, blade, smarty, ftl, vm, vsl, tpl, tmpl, phtml, php3, php4, php5, phps, pht, phar, shtml, shtm, stm, ihtml, mhtml, mht, wml, wap, csp, cer, part, webmanifest, appcache, webapp, map, coffee, dart, elm, cljs, elm
Params
- settings{}TCommonFileExtensionsSettings
Settings to customize the function behavior
Return
- -Array<String>
The array of extensions
Example
import { commonWebFileExtensions } from '@blackbyte/sugar/extension';
const extensions = commonWebFileExtensions();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