Skip to content

Commit 5feacfa

Browse files
authored
Merge pull request #546 from bGrass/reg_exps_from_bids_common
Abstract away regular expressions for path validation in a programming language agnostic way
2 parents fe8bb62 + 16aeb86 commit 5feacfa

File tree

5 files changed

+109
-270
lines changed

5 files changed

+109
-270
lines changed

utils/bids_files.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* eg. corresponding files
44
*/
55
// dependencies -------------------------------------------------------------------
6-
const dataExtRE = require('./data_extensions.js')
6+
const type = require('./type.js')
77

88
// public API ---------------------------------------------------------------------
99
const bidsFileUtils = {
@@ -64,7 +64,7 @@ function verifyDatafileMatch(sidecarPath, noExt, matchFile) {
6464
let megDs = false
6565
// Make sure it's not the data dictionary itself
6666
const isSelf = matchFile.relativePath === sidecarPath
67-
if (!isSelf && dataExtRE.test(matchFile.name)) {
67+
if (!isSelf && type.file.isModality(matchFile.name)) {
6868
match = true
6969
}
7070
// MEG datafiles may be a folder, therefore not contained in fileList, will need to look in paths

utils/data_extensions.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)