1.0.0 • Published 7 years ago

pnut-to-markdown v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

pnut-to-markdown

Converts the output of the pnut.io API (back) to Markdown. Intention is to make editing a users profile seamless.

Install

npm install pnut-to-markdown

Usage

You basically want to feed it the output of data.content.html after fetching a user object:

const pnutToMarkdown = require("pnut-to-markdown");
const pnut = require("pnut-butter");
const user = await pnut.user("me");


const converted = pnutToMarkdown(user.data.content.html);
console.log(converted);

License

MIT © Kai Wood