Skip to content
This repository was archived by the owner on Feb 1, 2022. It is now read-only.
This repository was archived by the owner on Feb 1, 2022. It is now read-only.

table incorrectly outputs number values as strings with output : 'json' option  #309

@srlowe

Description

@srlowe
const data = [{
	name: 'bob',
	age: 32,
}];

console.log(JSON.stringify(data, undefined, 2));

cli.table(data, {
	name: {},
	age: {},
}, {output: 'json'});

Output:

[
  {
    "name": "bob",
    "age": 32
  }
]

[
  {
    "name": "bob",
    "age": "32"          <----- 
  }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions