2.0.4 • Published 9 years ago

ape-doc v2.0.4

Weekly downloads
18
License
MIT
Repository
github
Last release
9 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

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago