d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Nodejs Task: Parse Functions And Constants > 100fg
Add Reply New Topic New Poll
Member
Posts: 14,925
Joined: Jan 3 2008
Gold: 135,879.75
Jan 2 2020 09:20am

1. Read a directory which contains js files.
2. For each js file:
A. parse function names. Ex: function foo() {/*code*/} would be parsed as 'foo'.
B. parse constant names. Ex: const boo = 'hi' would be parsed as 'boo'.
3. Stream the parsed results into an output.txt.

Code
Example output.txt

Parsed Functions and Constants for the folder ${specifiedFolderDirectory}

File ${firstFile}:

Parsed Snippet 1
Parsed Snippet 2
Parsed Snippet 3

File ${secondFile}:

Parsed Snippet 1
Parsed Snippet 2
Et cetera
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll