温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/globals/Console/table
点击访问原文链接

Console.table method | globals module | Bun

Console.table method | globals module | BunBuildDocsReferenceGuidesBlogDiscord/Globals/Console/tableMtable

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/Globals/Console/tableMtable

method

Console.tabletable(tabularData?: any,properties?: string[]): void;

Try to construct a table with the columns of the properties of tabularData (or use properties) and rows of tabularData and log it. Falls back to just logging the argument if it can't be parsed as tabular.

// These can't be parsed as tabular data
console.table(Symbol());
// Symbol()

console.table(undefined);
// undefined

console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]);
// ┌────┬─────┬─────┐
// │ │ a │ b │
// ├────┼─────┼─────┤
// │ 0 │ 1 │ 'Y' │
// │ 1 │ 'Z' │ 2 │
// └────┴─────┴─────┘

console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
// ┌────┬─────┐
// │ │ a │
// ├────┼─────┤
// │ 0 │ 1 │
// │ 1 │ 'Z' │
// └────┴─────┘
@param properties

Alternate properties for constructing the table.

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

Console.table method | globals module | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    API documentation for method globals.Console.table | Bun