0.1.8 • Published 3 years ago

parse-header v0.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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" ] 
}
0.1.8

3 years ago

0.1.7

3 years ago