File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -131,22 +131,22 @@ function initFilePostProcess() {
131
131
return ;
132
132
}
133
133
134
- const modules = new Set ( ) ;
134
+ const packages = new Set ( ) ;
135
135
for ( const key of [
136
136
'dependencies' ,
137
137
'devDependencies' ,
138
138
'optionalDependencies' ,
139
139
'peerDependencies' ,
140
140
] ) {
141
- for ( const moduleName of Object . keys ( data ?. [ key ] || { } ) ) {
142
- modules . add ( moduleName ) ;
141
+ for ( const packageName of Object . keys ( data ?. [ key ] || { } ) ) {
142
+ packages . add ( packageName ) ;
143
143
}
144
144
}
145
145
146
146
// match chroma NameTag token to detect JSON object keys
147
147
for ( const el of document . querySelectorAll ( '.code-inner .nt' ) ) {
148
148
const jsonKey = el . textContent . replace ( / ^ " ( .* ) " $ / , '$1' ) ;
149
- if ( modules . has ( jsonKey ) ) {
149
+ if ( packages . has ( jsonKey ) ) {
150
150
const a = document . createElement ( 'a' ) ;
151
151
a . textContent = jsonKey ;
152
152
a . href = `https://www.npmjs.com/package/${ jsonKey } ` ;
You can’t perform that action at this time.
0 commit comments