1.0.31 • Published 1 year ago

@vandeurenglenn/doc-it v1.0.31

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

doc-it

simple js comment parser

usage

import docIt from '@vandeurenglenn/doc-it'

docIt({input: './testClass.js', output: 'docs'})

### input
```js
export default class SomeClass {
  /** 
   * @param {Number}
   */
  #token = 0

  /**
   * @example `someClass.someFunction('someString')`
   * @param {string} someParam description 
   * @link [my-link](https://somelink.link)
   * @return {string} someString description
   * 
   */
  someFunction(someParam) {
    return someString
  }
}
  

output

export default [
	{
		"start": 2,
		"end": 4,
		"value": "/**\n* @param {Number}\n*/",
		"code": {
			"value": "#token = 0"
		},
		"params": [
			{
				"name": "",
				"value": "{Number}",
				"type": "Number",
				"description": ""
			}
		],
		"examples": [],
		"links": [],
		"properties": [
			{
				"name": "#token",
				"value": "0",
				"isPrivate": true
			}
		]
	},
	{
		"start": 7,
		"end": 13,
		"value": "/**\n* @example `someClass.someFunction('someString')`\n* @param {string} someParam description\n* @link [my-link](https://somelink.link)\n* @return {string} someString description\n*\n*/",
		"code": {
			"value": "someFunction(someParam) {}"
		},
		"params": [
			{
				"name": "someParam",
				"value": "{string} someParam description",
				"type": "string",
				"description": "someParam description"
			}
		],
		"examples": [
			{
				"name": "example",
				"value": "someClass.someFunction('someString')"
			}
		],
		"links": [
			{
				"name": "my-link",
				"url": "https://somelink.link"
			}
		],
		"properties": [],
		"type": "method",
		"name": "someFunction",
		"return": {
			"name": "someString",
			"value": "{string} someString description",
			"type": "string",
			"description": "description"
		}
	}
]
1.0.31

1 year ago

1.0.30

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.27

1 year ago

1.0.16

1 year ago

1.0.22

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.23

1 year ago

1.0.11

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.10

2 years ago

1.0.7

2 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago