npm install cp3a comment parser 🌵
``javascript`
/*
* @module setting/profile - hero's basic info
* @action getHero - get a hero's profile
* @api {GET} /api/heroes/:id
* @param {Int} id - hero's id
*/
After parsed:
`javascript`
{
type: "project",
body: [
{
type: "module",
field: "setting/profile",
description: "hero's basic info",
body: [
{
type: "action",
field: "getHero",
description: "get a hero's profile",
body: [
{
type: "api",
datatype: "GET",
field: "/api/heroes/:id"
},
{
type: "param",
datatype: "Int",
field: "id",
description: "hero's id"
}
]
}
]
}
]
}
`bashinstall
npm i