markdown-tables-to-json
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -72,3 +72,3 @@ "use strict"; | ||
Extractor.tableToObject = function (table) { | ||
var keys = table.shift(); | ||
var keys = table.shift().slice(1); | ||
var obj = {}; | ||
@@ -75,0 +75,0 @@ table.forEach(function (cells) { |
{ | ||
"name": "markdown-tables-to-json", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Extracts tables from Markdown documents and converts to JSON objects.", | ||
@@ -23,3 +23,3 @@ "main": "./dist/index.js", | ||
"dependencies": { | ||
"marked-ts": "^1.0.0-beta.4" | ||
"marked-ts": "^1.0.0-beta.5" | ||
}, | ||
@@ -26,0 +26,0 @@ "devDependencies": { |
@@ -41,15 +41,13 @@ # markdown-tables-to-json | ||
```javascript | ||
{ mittens: | ||
{ name: 'black', head: 'black', body: 'black', tail: 'white' }, | ||
dipstick: | ||
{ name: 'white', head: 'white', body: 'black', tail: 'white' }, | ||
snow: | ||
{ name: 'white', head: 'white', body: 'white', tail: 'white' } } | ||
{ mittens: | ||
{ name: 'black', head: 'black', body: 'black', tail: 'white' }, | ||
dipstick: | ||
{ name: 'white', head: 'white', body: 'black', tail: 'white' }, | ||
snow: | ||
{ name: 'white', head: 'white', body: 'white', tail: 'white' } } | ||
{ | ||
mittens: { head: 'black', body: 'black', tail: 'black', paws: 'white' }, | ||
dipstick: { head: 'white', body: 'white', tail: 'black', paws: 'white' }, | ||
snow: { head: 'white', body: 'white', tail: 'white', paws: 'white' } | ||
} | ||
{ | ||
mittens: { head: 'black', body: 'black', tail: 'black', paws: 'white' }, | ||
dipstick: { head: 'white', body: 'white', tail: 'black', paws: 'white' }, | ||
snow: { head: 'white', body: 'white', tail: 'white', paws: 'white' } | ||
} | ||
``` | ||
@@ -8,3 +8,3 @@ /* | ||
* Ian Cooper | ||
* 12 September 2018 | ||
* 31 December 2020 | ||
* | ||
@@ -127,3 +127,3 @@ */ | ||
let keys: string[] = table.shift(); | ||
let keys: string[] = table.shift().slice(1); | ||
let obj = {}; | ||
@@ -130,0 +130,0 @@ |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ { |
Sorry, the diff of this file is not supported yet
20056
53
Updatedmarked-ts@^1.0.0-beta.5