File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,18 @@ const { types, extensions } = require('mime-types')
5
5
const readdir = promisify ( fs . readdir )
6
6
const HTTPError = require ( './http-error' )
7
7
8
- // A ResourceMapper maintains the mapping between HTTP URLs and server filenames,
9
- // following the principles of the “sweet spot” discussed in
10
- // https://www.w3.org/DesignIssues/HTTPFilenameMapping.html
8
+ /*
9
+ * A ResourceMapper maintains the mapping between HTTP URLs and server filenames,
10
+ * following the principles of the “sweet spot” discussed in
11
+ * https://www.w3.org/DesignIssues/HTTPFilenameMapping.html
12
+ *
13
+ * This class implements this mapping in a single place
14
+ * such that all components use the exact same logic.
15
+ *
16
+ * There are few public methods, and we STRONGLY suggest not to create more.
17
+ * Exposing too much of the internals would likely give other components
18
+ * too much knowledge about the mapping, voiding the purpose of this class.
19
+ */
11
20
class ResourceMapper {
12
21
constructor ( {
13
22
rootUrl,
You can’t perform that action at this time.
0 commit comments