https://github.com/junosuarez/conch
npm module: format markdown for console output
https://github.com/junosuarez/conch
Last synced: 9 months ago
JSON representation
npm module: format markdown for console output
- Host: GitHub
- URL: https://github.com/junosuarez/conch
- Owner: junosuarez
- Created: 2012-11-26T10:43:56.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-11-26T10:47:39.000Z (over 13 years ago)
- Last Synced: 2025-02-15T16:46:16.475Z (over 1 year ago)
- Language: JavaScript
- Size: 102 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# conch
format markdown for console output
## Installation
$ npm install conch
## Usage
var conch = require('conch');
var fs = require('fs');
fs.readFile(__dirname + '/README.md', function (err, file) {
if (err) return console.error(err);
console.log(
conch(file.toString())
);
});
Note, conch is implemented as a formatter using the fantastic [marked](http://npm.im/marked) markdown parser. It works by parsing tokens generated by `marked.lexer()`. Ordinarily, calling `conch()` on some markdown will call that for you. But if you happen to have an array of `marked` tokens laying around, you can pass that directly to `conch.parse()`. Let the md AST mangling commence!
## License
MIT. (c) 2012 jden - Jason Denizac