UNPKG
test-exclude
Version:
latest (8.0.0)
8.0.0
7.0.2
7.0.1
7.0.0
6.0.0
6.0.0-alpha.3
6.0.0-alpha.2
6.0.0-alpha.1
6.0.0-alpha.0
6.0.0-alhpa.3
5.2.3
5.2.2
5.2.1
5.2.0
5.1.0
5.0.1
5.0.0
4.2.3
4.2.2
4.2.1
4.2.0
4.1.1
4.1.0
4.0.3
4.0.2
4.0.1
4.0.0
3.3.0
3.2.2
3.2.1
3.2.0
3.1.0
3.0.0
2.1.3
2.1.2
2.1.1
2.1.0
2.0.0
1.1.0
1.0.0
test for inclusion or exclusion of paths using globs
istanbul.js.org
istanbuljs/test-exclude
test-exclude
/
is-outside-dir-posix.js
8 lines
(5 loc)
•
147 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
'use strict'
;
const
path =
require
(
'path'
);
module
.
exports
=
function
(
dir, filename
) {
return
/^\.\./
.
test
(path.
relative
(dir, filename)); };