isInternalFile.js 302 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
/* @flow */
function isInternalFile(url: string, sourceFileName: string | null | void) {
  return url.indexOf('/~/') !== -1 ||
    url.indexOf('/node_modules/') !== -1 ||
    url.trim().indexOf(' ') !== -1 ||
    sourceFileName == null ||
    sourceFileName.length === 0;
}

export { isInternalFile };