Socket
Socket
Sign inDemoInstall

@types/table

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/table - npm Package Compare versions

Comparing version 4.0.7 to 5.0.0

43

table/index.d.ts

@@ -1,19 +0,11 @@

// Type definitions for table 4.0
// Type definitions for table 5.0
// Project: https://github.com/gajus/table
// Definitions by: Evan Shortiss <https://github.com/evanshortiss>
// mrmlnc <https://github.com/mrmlnc>
// Daniel Perez Alvarez <https://github.com/unindented>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export type BorderType = 'honeywell' | 'norc' | 'ramac' | 'void';
export type TableBorderTemplate = 'honeywell' | 'norc' | 'ramac' | 'void';
export interface ColumnConfig {
alignment?: 'left' | 'center' | 'right';
paddingLeft?: number;
paddingRight?: number;
truncate?: number;
width?: number;
wrapWord?: boolean;
}
export interface JoinStruct {
export interface TableBorder {
topBody?: string;

@@ -39,17 +31,32 @@ topJoin?: string;

export interface TableColumns {
alignment?: 'left' | 'center' | 'right';
paddingLeft?: number;
paddingRight?: number;
truncate?: number;
width?: number;
wrapWord?: boolean;
}
export type TableDrawHorizontalLine = (index: number, size: number) => boolean;
export interface TableUserConfig {
border?: TableBorder;
columns?: {
[index: number]: ColumnConfig
[index: number]: TableColumns;
};
drawHorizontalLine?: (index: number, size: number) => boolean;
border?: JoinStruct;
columnDefault?: ColumnConfig;
columnDefault?: TableColumns;
columnCount?: number;
drawHorizontalLine?: TableDrawHorizontalLine;
singleLine?: boolean;
}
export interface TableStream {
write(row: string[]): void;
}
export function table(data: any[], userConfig?: TableUserConfig): string;
export function createStream(userConfig: TableUserConfig): { write: string[] };
export function createStream(userConfig: TableUserConfig): TableStream;
export function getBorderCharacters(templateName: BorderType): JoinStruct;
export function getBorderCharacters(templateName: TableBorderTemplate): TableBorder;
{
"name": "@types/table",
"version": "4.0.7",
"version": "5.0.0",
"description": "TypeScript definitions for table",

@@ -16,6 +16,11 @@ "license": "MIT",

"githubUsername": "mrmlnc"
},
{
"name": "Daniel Perez Alvarez",
"url": "https://github.com/unindented",
"githubUsername": "unindented"
}
],
"main": "",
"types": "index",
"types": "index.d.ts",
"repository": {

@@ -28,4 +33,4 @@ "type": "git",

"dependencies": {},
"typesPublisherContentHash": "ce2252813527314141f85d25daa569d5ef34ca8ffe2b8d32f40119852b9bdd34",
"typeScriptVersion": "2.0"
"typesPublisherContentHash": "4243444de091409612f8c440e316a831d0163264174c645aa08b9ca67aa65391",
"typeScriptVersion": "2.8"
}

@@ -8,6 +8,6 @@ # Installation

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/table
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/table.
Additional Details
* Last updated: Thu, 05 Sep 2019 18:17:16 GMT
### Additional Details
* Last updated: Wed, 01 Apr 2020 21:47:22 GMT
* Dependencies: none

@@ -17,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by Evan Shortiss <https://github.com/evanshortiss>, and mrmlnc <https://github.com/mrmlnc>.
These definitions were written by [Evan Shortiss](https://github.com/evanshortiss), [mrmlnc](https://github.com/mrmlnc), and [Daniel Perez Alvarez](https://github.com/unindented).
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