# console.form
**Repository Path**: nodets/console.form
## Basic Information
- **Project Name**: console.form
- **Description**: console.form
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-09-08
- **Last Updated**: 2025-09-08
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# console.form
A universal grid/table printer for browsers, Node.js and TypeScript with beautiful console output.
---
## Features
- 🌐 Cross-platform support: works in both browser and Node.js environments
- 📝 Full TypeScript type support
- 📊 Beautiful Unicode table grids
- 🌏 Perfect support for mixed Chinese and English content
- ⚙️ Flexible configuration options
- 📱 Supports text and HTML tables in browsers
- 🔗 Automatically extends `console` object, use as `console.form`
---
## Installation
```bash
npm install console.form
```
---
## Quick Start
### 1. In Node.js
```javascript
// Use extended console.form directly
require('console.form');
const data = [
{ name: 'Zhang San', age: 25, city: 'Beijing' },
{ name: 'Li Si', age: 30, city: 'Shanghai' },
{ name: 'Wang Wu', age: 28, city: 'Guangzhou' }
];
console.form(data);
// Or use import method
const { form } = require('console.form');
form(data);
```
### 2. In TypeScript
```typescript
import 'console.form'; // Automatically extends console object
interface Employee {
name: string;
age: number;
city: string;
}
const data: Employee[] = [
{ name: 'Zhang San', age: 25, city: 'Beijing' },
{ name: 'Li Si', age: 30, city: 'Shanghai' },
{ name: 'Wang Wu', age: 28, city: 'Guangzhou' }
];
// Use console.form directly
console.form(data);
// Or use destructuring import
import { form } from 'console.form';
form(data);
```
### 3. In Browser
#### UMD Version (Recommended)
```html
```
#### ES Module Usage
```javascript
import { form } from 'console.form';
const data = [
{ name: 'John', age: 30, city: 'New York' },
{ name: 'Jane', age: 25, city: 'Los Angeles' }
];
form(data);
```