1.0.0 • Published 5 years ago

@jordan-coded4/tabulate v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

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>'