Namibian Pyjama Merchant
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

md2hatena

0.3.1 • Public • Published

md2hatena

Build Status NPM Version License Coverage Status

Markdown to Hatena Syntax (はてな記法) converter.

example

md2hatena suports all markdown syntax defined in mdast!

Install

npm i -g md2hatena

Usage

md2hatena can be used in 4 ways:

As a CLI command

$ md2hatena foo.md > foo.hatena

As a Atom command in language-hatena package

Language Hatena: Convert Markdown To Hatena Syntax command is available in language-hatena package.

As a library

import fs from 'fs';
import { md2hatena } from 'md2hatena';
 
const md = fs.readFileSync('foo.md', 'utf8');
md2hatena(md).then((hatena) => {
  console.log(hatena);
})

As a remark plugin

import remark from 'remark';
import { stringify } from 'md2hatena';
 
remark().use(stringify).process(md, (vfile) => {
  console.log(vfile.contents);
});

LICENSE

MIT

install

npm i md2hatena

Downloadsweekly downloads

16

version

0.3.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability