api-sorter

#7856 for more information

Usage no npm install needed!

<script type="module">
  import apiSorter from 'https://cdn.skypack.dev/api-sorter';
</script>

README

api-sorter

#7856 for more information

Used by antd and uform.

Installation

npm install api-sorter

Usage

const apiSorter = require('api-sorter');
apiSorter({ file: 'components/**/index.+(zh-CN|en-US).md' }).then(() => {
  console.log('Sorted API successfully!');
});

API

apiSorter({ file, [dest] })

file

Type: Array string Required: true

dest

Type: string Required: false Default: .

apiSorter will return a Promise.

apiSorter.sort(AST)

AST

Get Markdown AST using unified and remark-parse.

it will return sorted AST.