
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Parse atomdoc with JavaScript / CoffeeScript.
Like really really experimental. Do not use for now. The doc format and output will change without warning! This project might go away altogether.
It's on npm
npm install atomdoc
It only has one method, parse
, that takes no options.
AtomDoc = require 'atomdoc'
docString = """
Public: My awesome method that does stuff.
It does things and stuff and even more things, this is the description. The
next section is the arguments. They can be nested. Useful for explaining the
arguments passed to any callbacks.
* `count` An {Int} representing count
* `callback` A {Function} that will be called when finished
* `options` Options {Object} passed to your callback with the options:
* `someOption` A {Bool}
* `anotherOption` Another {Bool}
## Events
The events section can have a description if you like.
* `contents-modified` Fired when this thing happens.
* `options` An options hash
## Examples
This is an example. It can have a description
```coffee
myMethod 20, ({someOption, anotherOption}) ->
console.log someOption, anotherOption
`` `
Returns a {Bool}; true when it does the thing
"""
doc = AtomDoc.parse(docString)
doc
will be an object:
{
"visibility": "Public",
"summary": "My awesome method that does stuff.",
"description": """
My awesome method that does stuff.
It does things and stuff and even more things, this is the description. The
next section is the arguments. They can be nested. Useful for explaining the
arguments passed to any callbacks.
"""
"sections": [{
"type": "arguments",
"description": "",
"arguments": [{
"name": "count",
"description": "An {Int} representing count",
"type": "Int"
},
{
"name": "callback"
"description": "A {Function} that will be called when finished"
"type": "Function"
"arguments": [{
"name": "options"
"description": "Options {Object} passed to your callback with the options:"
"type": "Object"
"arguments": [{
"name": "someOption",
"description": "A {Bool}",
"type": "Bool"
},
{
"name": "anotherOption",
"description": "Another {Bool}",
"type": "Bool"
}]
}]
}]
},
{
"type": "events",
"description": "The events section can have a description if you like.",
"events": [{
"name": "contents-modified"
"description": "Fired when this thing happens."
"type": null
"arguments": [{
"name": "options",
"description": "An options hash",
"type": null
}]
}]
},
{
"type": "examples",
"examples": [{
"description": "This is an example. It can have a description",
"lang": "coffee",
"code": "myMethod 20, ({someOption, anotherOption}) ->\n console.log someOption, anotherOption",
"raw": "```coffee\nmyMethod 20, ({someOption, anotherOption}) ->\n console.log someOption, anotherOption\n```"
}]
}],
"returnValues": [{
"type": "Bool",
"description": "Returns a {Bool}; true when it does the thing"
}]
}
The parser uses marked's lexer.
FAQs
An atomdoc parser
The npm package atomdoc receives a total of 22 weekly downloads. As such, atomdoc popularity was classified as not popular.
We found that atomdoc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.