Skip to content

Commit fe0e456

Browse files
committed
Improve index variable name in ResourceMapper
1 parent eb73ae2 commit fe0e456

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/resource-mapper.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ class ResourceMapper {
1313
rootPath,
1414
includeHost = false,
1515
defaultContentType = 'application/octet-stream',
16-
indexName = 'index',
16+
indexFilename = 'index',
1717
overrideTypes = { acl: 'text/turtle', meta: 'text/turtle' }
1818
}) {
1919
this._rootUrl = this._removeTrailingSlash(rootUrl)
2020
this._rootPath = this._removeTrailingSlash(rootPath)
2121
this._includeHost = includeHost
2222
this._readdir = readdir
2323
this._defaultContentType = defaultContentType
24-
this._indexName = indexName
24+
this._indexFilename = indexFilename
2525
this._types = { ...types, ...overrideTypes }
2626

2727
// If the host needs to be replaced on every call, pre-split the root URL
@@ -47,7 +47,7 @@ class ResourceMapper {
4747

4848
// Append index filename if the URL ends with a '/'
4949
if (isIndex) {
50-
fullPath += this._indexName
50+
fullPath += this._indexFilename
5151
}
5252

5353
// Create the path for a new file
@@ -70,7 +70,7 @@ class ResourceMapper {
7070

7171
// Find a file with the same name (minus the dollar extension)
7272
let match = files.find(f => this._removeDollarExtension(f) === filename ||
73-
(isIndex && f.startsWith(this._indexName + '.')))
73+
(isIndex && f.startsWith(this._indexFilename + '.')))
7474
if (!match) {
7575
// Error if no match was found,
7676
// unless the URL ends with a '/',

0 commit comments

Comments
 (0)