@jordan-coded4/tabulate

A tool to turn a string into a table row and cells, seperate each with §.

Usage no npm install needed!

<script type="module">
  import jordanCoded4Tabulate from 'https://cdn.skypack.dev/@jordan-coded4/tabulate';
</script>

README

Tabulate

Turn a text area in to table cells, replacing § for .

Created as my first NPM module, I've needed to create this when building static sites through Wintersmith, as when inserting content for multiple products with different specifications, instead of creating multiple tables for each, use one string to make custom tables, fully customisable.

Install

$ npm install tabulate --save

Usage

const tabulate = require('tabulate');
const rows = 'First§row\nsecond§row';
console.log(tabulate(rows));
//=> '<tr><td>First</td><td>row</td></tr><tr><td>second</td><td>row</td></tr>'