enhancementgood first issue
Repository metrics
- Stars
- (1 star)
- PR merge metrics
- (30d に merged PR はありません)
説明
It would be cool to be able to pipe JS expressions into util-inspect:
echo '{foo: [{bar: 'baz'}]}' | util-inspect --js
# { foo: [ { bar: 'baz' } ] }
It shouldn't evaluate the JS expression though, as e.g. curl | util-inspect might easily get abused then, but it could
- parse the JS using acorn
- check if its static (only
ArrayExpression,ObjectExpression,Property,Identifier,Literal) - evaluate it
- inspect it as with JSON input