2.0.4 • Published 8 years ago

ape-doc v2.0.4

Weekly downloads
18
License
MIT
Repository
github
Last release
8 years ago

ape-doc

Build Status Code Climate Code Coverage npm Version JS Standard

Doc parser of ape.

Installation

$ npm install ape-doc --save

Usage

'use strict';

const apeDoc = require('ape-doc');

// Javascript file path to read.
let FILE_PATH = require.resolve('ape-doc/lib/comments_in_file');
let comments = apeDoc(
  FILE_PATH
)
assert.deepEqual(comments, [
  {
    'line': 0,
    'description': 'Extract comments from a file.',
    'function': [
      {
        'name': 'commentsInFile',
        'optional': false,
        'type': '',
        'description': '',
        'line': 2,
        'source': '@function commentsInFile'
      }
    ],
    'param': [
      {
        'type': 'string',
        'name': 'filename',
        'optional': false,
        'description': '- Filename to read.',
        'line': 3,
        'source': '@param {string} filename - Filename to read.'
      }
    ],
    'returns': [
      {
        'type': 'Object[]',
        'name': '',
        'optional': false,
        'description': '',
        'line': 4,
        'source': '@returns {Object[]}'
      }
    ]
  },
  {
    'line': 11,
    'description': '',
    'lends': [
      {
        'name': 'commentsInFile',
        'optional': false,
        'type': '',
        'description': '',
        'line': 11,
        'source': '@lends commentsInFile'
      }
    ]
  }
])

License

This software is released under the MIT License.

Links

2.0.4

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago