Closed codeasashu closed 2 years ago
@joolfe Kindly approve
@joolfe I am using this awesome library in one of my JS project https://github.com/codeasashu/react-openapi-designer
I am allowing users to copy paste a json string and maintaining it as JS object. In my case, it is easier this way since it is a SPA and this project will help a lot
@joolfe The other reason is simply that in my JS project, I can't use file upload (it is a SPA). Hence, I am depending on FileReader
API to read the file contents, which gives me JSON object.
Again, it is better this way that it should be able to support both the file and the string. It's an enhancement
I will take into consideration as feature but cannot accept this merge as it doesn't contain any unit test neither for the library or for the cli...
@joolfe Thanks for consideration. Please do not close this MR as I will be adding tests soon
my use case would be pipe raw json output to jq
cli tool to do some sort of transformation.
Merged and reverted by error, but i will keep in mind.
I wanted this to integrate this awesome tool into my browser based react application.
Everything I wanted is usable in a browser except
fs
, which I don't really need in my case.Hence this fixes the hard requirement of
fs
. Only depend onfs
if someone is interested in reading or writing files