0.1.8 • Published 3 years ago
parse-header v0.1.8
C++ Header Parser
Installation
With npm installed, do
$ npm install parse-header
Example
So you have a file example.cpp
:
/*
INT: 1
STRING: String
List:
- ListItem1
- ListItem2
*/
#include <bits/stdc++.h>
using namespace std;
int main() {
cout <<"Hello World\n";
return 0;
}
In your NodeJS file,
const parseHeader = require('parse-header');
console.log(parseHeader('./example.cpp'))
The result is
{
"INT": 1,
"STRING": "String",
"List": [ "ListItem1", "ListItem2" ]
}