Tiny Regex improvements

Summary: Recreation of D22118786, which was so old rebasing died on some lacking meta data. Lands https://github.com/facebook/flipper/pull/1256

Reviewed By: passy

Differential Revision: D24331424

fbshipit-source-id: 65fc5d8bf0242d4266e269716a319d71ce2e2826
This commit is contained in:
Michel Weststrate
2020-10-15 09:20:07 -07:00
committed by Facebook GitHub Bot
parent 6b7b1fab5c
commit 99757622a5
5 changed files with 10 additions and 16 deletions

View File

@@ -15,7 +15,7 @@ const isFBFile = (filePath: string) =>
filePath.includes(`${path.sep}fb${path.sep}`);
const requireFromFolder = (folder: string, path: string) =>
new RegExp(folder + '/[\\w.-_]+(.js)?$', 'g').test(path);
new RegExp(folder + '/[\\w.-]+(.js)?$', 'g').test(path);
module.exports = () => ({
name: 'replace-fb-stubs',