gentlejs
v1.0.8
Published
A utility to generate markdown tables from arrays of objects
Downloads
4
Readme
ES Module Syntax Example
import { gentle } from "gentlejs";
CommonJs Syntax Example
const {gentle} = require("gentlejs")
Functions
generateMarkdownTable
import { gentle } from "gentlejs";
const data = [
{ Name: 'Alice', Age: 30, Occupation: 'Engineer' },
{ Name: 'Bob', Age: 25, Occupation: 'Designer' },
{ Name: 'Carol', Age: 35, Occupation: 'Manager' }
];
console.log(gentle.generateMarkdownTable(data));
------
Output:
| Name | Age | Occupation |
| --- | --- | --- |
| Alice | 30 | Engineer |
| Bob | 25 | Designer |
| Carol | 35 | Manager |