Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
35 lines (26 loc) · 745 Bytes

File metadata and controls

35 lines (26 loc) · 745 Bytes
Copy raw file
Download raw file
Outline
Edit and raw actions

Online inverter here: http://harttle.land/invert-markdown-table/, also available on npm:

npm i invert-markdown-table

Usage

var invertMarkdownTable = require('invert-markdown-table');
var source = 'a | b\n---|---\nc | d'
var result = invertMarkdownTable(source);
console.log(result);
// Outputs:
// a | c\n---|---\nb | d

Use in Browser

Global Variable:

var source = 'a | b\n---|---\nc | d';
var result = window.invertMarkdownTable(source);

RequireJS:

require(['invert-markdown-table'], function (invertMarkdownTable) {
    var source = 'a | b\n---|---\nc | d'
    var result = invertMarkdownTable(source);
});
Morty Proxy This is a proxified and sanitized view of the page, visit original site.