0.0.1 • Published 11 years ago
table-ize v0.0.1
table-ize
Turn markdown style(ish) table syntax to an array of objects.
Install
npm install table-izeExample
tableize() turns a string like this:
| one | two | three |
| a   | b   | c     |
| d   | e   | f     |To this:
[
  {one: "a", two: "b", three: "c"},
  {one: "d", two: "e", three: "f"}
]Use tableize.rowsObject(), you can also create a single object by using the first column as the key and second column as the value.
| one   | a |
| two   | b |
| three | c |Gives you:
{
  one: "a",
  two: "b",
  three: "c"
}License
MIT

