Skip to content

Tool suggestion: Add a JS → JSON object converter #13

@0livare

Description

@0livare

A great JSON utility would be one that can take a JavaScript object and output a nicely formatted JSON object.

JSON is a valid JS object, but not the other way around because JSON requires all property names to be quoted, only supports double quotes, and doesn't allow for trailing commas.

ut json fromjs {foo: 'bar', 'one': 1,}

{
  "foo": "bar",
  "one": 1
}

Maybe even a -c / --clipboard option to automatically copy the output to the clipboard could be cool!

This is just a suggestion, thanks for creating such a useful group of utilities!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions