@@ -24,7 +24,7 @@ const NEVER_IGNORED = /^(?:readme\.[^.]*|(?:licen[cs]e|changes|changelog|history
24
24
* @returns {boolean } `true` if the file name is a relative path to a ancestor
25
25
* directory.
26
26
*/
27
- function notAncestorFiles ( filePath ) {
27
+ function isAncestorFiles ( filePath ) {
28
28
return PARENT_RELATIVE_PATH . test ( filePath )
29
29
}
30
30
@@ -124,7 +124,7 @@ function parseNpmignore(basedir, filesFieldExists) {
124
124
}
125
125
126
126
/**
127
- * Gets an object to check whether or not a given path should be ignored.
127
+ * Gets an object to check whether a given path should be ignored or not .
128
128
* The object is created from:
129
129
*
130
130
* - `files` field of `package.json`
@@ -137,7 +137,7 @@ function parseNpmignore(basedir, filesFieldExists) {
137
137
* `match` returns `true` if a given file path should be ignored.
138
138
*/
139
139
module . exports = function getNpmignore ( startPath ) {
140
- const retv = { match : notAncestorFiles }
140
+ const retv = { match : isAncestorFiles }
141
141
142
142
const p = getPackageJson ( startPath )
143
143
if ( p ) {
@@ -155,17 +155,17 @@ module.exports = function getNpmignore(startPath) {
155
155
if ( filesIgnore && npmignoreIgnore ) {
156
156
retv . match = and (
157
157
filterNeverIgnoredFiles ( p ) ,
158
- or ( notAncestorFiles , filesIgnore , npmignoreIgnore )
158
+ or ( isAncestorFiles , filesIgnore , npmignoreIgnore )
159
159
)
160
160
} else if ( filesIgnore ) {
161
161
retv . match = and (
162
162
filterNeverIgnoredFiles ( p ) ,
163
- or ( notAncestorFiles , filesIgnore )
163
+ or ( isAncestorFiles , filesIgnore )
164
164
)
165
165
} else if ( npmignoreIgnore ) {
166
166
retv . match = and (
167
167
filterNeverIgnoredFiles ( p ) ,
168
- or ( notAncestorFiles , npmignoreIgnore )
168
+ or ( isAncestorFiles , npmignoreIgnore )
169
169
)
170
170
}
171
171
0 commit comments