MCPcopy Create free account
hub / github.com/andreypopp/reactify / isJSXFile

Function isJSXFile

index.js:50–61  ·  view source on GitHub ↗
(filename, options)

Source from the content-addressed store, hash-verified

48}
49
50function isJSXFile(filename, options) {
51 if (options.everything) {
52 return true;
53 } else {
54 var extensions = ['js', 'jsx']
55 .concat(options.extension)
56 .concat(options.x)
57 .filter(Boolean)
58 .map(function(ext) { return ext[0] === '.' ? ext.slice(1) : ext });
59 return new RegExp('\\.(' + extensions.join('|') + ')$').exec(filename);
60 }
61}
62
63module.exports = reactify;

Callers 1

compileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…