New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

tomdoc

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tomdoc

A TomDoc parser

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

TomDoc parser

Parse tomdoc with JavaScript / CoffeeScript.

Usage

It's on npm

npm install tomdoc

It only has one method, parse, that takes no options.

TomDoc = require 'tomdoc'

docString = """
  Public: My awesome method that does stuff.

  It does things and stuff and even more things, this is the description.

  count - an {Int} representing count
  callback - a {Function} that will be called when finished

  Returns a {Bool}; true when it does the thing
"""
doc = TomDoc.parse(docString)

doc will be an object:

{
  status: 'Public',
  summary: 'My awesome method that does stuff.'
  description: 'My awesome method that does stuff.\nIt does things and stuff and even more things, this is the description.',
  arguments: [{
    name: 'count',
    description: 'an {Int} representing count',
    type: 'Int'
  }, {
    name: 'callback',
    description: 'a {Function} that will be called when finished',
    type: 'Function'
  }],
  returnValue: [{
    type: 'Bool',
    description: 'Returns a {Bool}; true when it does the thing'
  }],
  originalText: """
    Public: My awesome method that does stuff.

    It does things and stuff and even more things, this is the description.

    count - an {Int} representing count
    callback - a {Function} that will be called when finished

    Returns a {Bool}; true when it does the thing
  """
}

The parser was pulled out of biscotto

FAQs

Package last updated on 29 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts