Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@oclif/table

Package Overview
Dependencies
Maintainers
0
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oclif/table - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

4

lib/index.d.ts

@@ -1,2 +0,2 @@

export { makeTable, makeTables } from './table.js';
export type { TableProps } from './types.js';
export { printTable, printTables } from './table.js';
export type { ScalarDict, TableProps } from './types.js';

@@ -1,1 +0,1 @@

export { makeTable, makeTables } from './table.js';
export { printTable, printTables } from './table.js';

@@ -22,5 +22,5 @@ import React from 'react';

*/
export declare function makeTable<T extends ScalarDict>(options: TableProps<T>): void;
export declare function makeTables<T extends ScalarDict[]>(tables: {
export declare function printTable<T extends ScalarDict>(options: TableProps<T>): void;
export declare function printTables<T extends ScalarDict[]>(tables: {
[P in keyof T]: TableProps<T[P]>;
}, options?: Omit<ContainerProps, 'children'>): void;

@@ -220,3 +220,3 @@ /* eslint-disable react/prop-types */

*/
export function makeTable(options) {
export function printTable(options) {
const instance = render(React.createElement(Table, { ...options }));

@@ -228,3 +228,3 @@ instance.unmount();

}
export function makeTables(tables, options) {
export function printTables(tables, options) {
const leftMargin = options?.marginLeft ?? options?.margin ?? 0;

@@ -231,0 +231,0 @@ const rightMargin = options?.marginRight ?? options?.margin ?? 0;

@@ -126,12 +126,12 @@ import { BorderStyle } from './skeletons.js';

* // sort the name column in ascending order
* makeTable({data, sort: {name: 'asc'}})
* printTable({data, sort: {name: 'asc'}})
*
* // sort the name column in descending order
* makeTable({data, sort: {name: 'desc'}})
* printTable({data, sort: {name: 'desc'}})
*
* // sort by name in ascending order and age in descending order
* makeTable({data, sort: {name: 'asc', age: 'desc'}})
* printTable({data, sort: {name: 'asc', age: 'desc'}})
*
* // sort by name in ascending order and age in descending order using a custom sort function
* makeTable({data, sort: {name: 'asc', age: (a, b) => b - a}})
* printTable({data, sort: {name: 'asc', age: (a, b) => b - a}})
* ```

@@ -138,0 +138,0 @@ */

{
"name": "@oclif/table",
"description": "Display table in terminal",
"version": "0.1.0",
"version": "0.1.1",
"author": "Salesforce",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/oclif/multi-stage-output/issues",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc