ape-doc
Doc parser of ape.
Last updated 2 years ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install ape-doc 
SYNC missed versions from official npm registry.

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

Maintainers (1)
Downloads
Today 13
This Week 13
This Month 53
Last Day 0
Last Week 13
Last Month 72
Dependencies (5)
Dev Dependencies (13)

Copyright 2014 - 2016 © taobao.org |