Adds useful Console methods to Google Apps Script
Import the following script ID as a library into your Google Apps Script project:
18Wk4wG7DGRGvy39zZbWhkU37z6ytqW06QkSwUlZHlIClQXHmCtEFucvD
Initiate ConsoleAS
:
const cx = ConsoleAS.init();
Install by running:
npm i @wildhog/consolas
Import and initiate ConsolAS
:
import { ConsolAS } from 'consolas';
const cx = new ConsolAS();
The IIFE in the dist/copy-paste/consolas.js
returns a class and stores it in the ConsolAS
variable. Hence you only need to initiate the said class:
const cx = new ConsolAS();
ConsolAS
works with two-dimensional arrays and objects.
Example 1:
cx.table([
['Name', 'Profession'],
['John Doe', 'Developer'],
['Jane Doe', 'Designer'],
['Jim Doe', 'Artist'],
]);
This prints out:
| (index) | 0 | 1 |
| ------- | -------- | ---------- |
| 0 | Name | Profession |
| 1 | John Doe | Developer |
| 2 | Jane Doe | Designer |
| 3 | Jim Doe | Artist |
Example 2:
cx.table({
name: 'John Doe',
profession: 'Developer',
age: 30,
city: 'Anytown',
});
This prints out:
| (index) | Value |
| ---------- | --------- |
| name | John Doe |
| profession | Developer |
| age | 30 |
| city | Anytown |
Currently only the table(TwoDimArray|Object)
method works. Other methods will follow soon.
npm t
👤 Dmitry Kostyuk | Wurkspaces.dev
Give a ⭐️ if this project helped you!
This README was generated with ❤️ by readme-md-generator