Documentation
fs/glob
getParser
Function getParser
getParser
(
file
:
string
)
:
null
|
string
|
{
language
:
unknown
;
name
:
string
}
Return the parser based on the file extension
Parameters
file
:
string
Path to the file
Returns
null
|
string
|
{
language
:
unknown
;
name
:
string
}
the parser to be used with the file or null if no parser is found
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Documentation
assets
block-
i18n
default
package-
i18n
default
theme-
i18n
default
wp-
plugin-
i18n
default
wp-
theme-
i18n
default
cli
get
Args
get
Args
get
Json
Args
get
Json
Args
parse
Cli
parse
Cli
Args
parse
Json
Args
const
allowed
Formats
block
Json
DEFAULT_
EXCLUDED_
PATH
default
Locale
file
Regex
i18n
Functions
Iso
Code
Regex
pkg
Json
Headers
plugin
Headers
theme
Headers
theme
Json
extractors
css
extract
Css
Theme
Data
headers
extract
Main
File
Data
generate
Header
translations
Headers
json
extract
Package
Json
get
Json
Comment
parse
Json
Callback
parse
Json
File
php
extract
Php
Plugin
Data
parse
PHP
File
schema
Json
Schema
Extractor
text
extract
File
Data
utils
gentranslation
get
Key
By
Value
yield
Parsed
Data
fs
fs
get
Charset
get
Encoding
Charset
get
Output
Path
read
File
Async
write
File
glob
get
Files
get
Parser
ignore
Func
index
default
make
Json
make
Pot
do
Tree
json
Command
default
make
Json
make
Pot
parser
exec
exec
make
Json
Make
Json
Command
default
make
Pot
make
Pot
patterns
get
Patterns
process
process
Files
progress
init
Progress
task
Runner
task
Runner
tree
do
Tree
pot
Command
default
types
Args
I18n
Headers
I18n
Schema
Jed
Data
Make
Json
Args
Patterns
Translation
Strings
Domain
Type
Pkg
Headers
Type
Plugin
Headers
Type
Pot
Headers
Theme
Headers
Type
utils/common
detect
Pattern
Type
get
Comment
Block
get
Copyright
get
Pkg
Json
Data
print
Make
Pot
Module
Info
print
Stats
print
Time
Elapsed
remove
Comment
Markup
reverse
Slashes
stringstring
strip
Translation
Markup
M
M
N
E
P
V
F
C
I
C
P
M
F
P
C
P
T
T
A
A
A
T
R
Return the parser based on the file extension