File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,17 @@ const { AbortController } = require("node-abort-controller");
26
26
fs . readFile ( './src/Options/Definitions.js' , 'utf8' ) ,
27
27
fs . readFile ( './src/Options/docs.js' , 'utf8' ) ,
28
28
] ) ;
29
+ const getDifference = ( s , t ) => {
30
+ s = [ ...s ] . sort ( ) ;
31
+ t = [ ...t ] . sort ( ) ;
32
+ return t . find ( ( char , i ) => char !== s [ i ] ) ;
33
+ } ;
34
+
29
35
if ( currentDefinitions !== newDefinitions ) {
30
- console . log ( currentDefinitions ) ;
31
- console . log ( newDefinitions ) ;
36
+ console . log ( getDifference ( currentDefinitions , newDefinitions ) ) ;
32
37
}
33
38
if ( currentDocs !== newDocs ) {
34
- console . log ( currentDocs ) ;
35
- console . log ( newDocs ) ;
39
+ console . log ( getDifference ( currentDocs , newDocs ) ) ;
36
40
}
37
41
if ( currentDefinitions !== newDefinitions || currentDocs !== newDocs ) {
38
42
console . error (
You can’t perform that action at this time.
0 commit comments