-
Notifications
You must be signed in to change notification settings - Fork 29
feat: stringifyWithSpace -> add method similar to elm encode #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@thomashoneyman reopened the #40 |
well, maybe the because it's whitespace and not something else https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify |
I have changed my decision and added the new func |
@thomashoneyman there is an error in tests I don't know how to fix, could you help |
@thomashoneyman I think this pr is ready to be merged this pr is superior to other 2 prs, because it defines stringifyWith func also maybe if we rerun tests it will pass now |
@srghma Sorry for such a long response time. I've had some time to think about what we should support in this library. I'm happy to merge a version of this PR which:
I'm not sure that If you feel strongly that there should also be a Thanks! |
By the way -- we've switched to GitHub Actions, so the next commit to this branch should re-run CI. |
@thomashoneyman pushed with comments but I don't understand - you want me to rename the
no, I dont think that there should be an alias, either |
I’m just saying there should only be 1 function, and it should take an int representing a number of spaces to indent. There would not be a function that takes a string as an argument. This would also mean we can remove the Foreign dependency added in this PR (which is why CI is failing at the moment). |
84a779b
to
423111f
Compare
removed foreign dep
yes, but maybe someone anyway find it useful can remove if you want |
I would rather remove it, for the sake of merging this PR, and if demand seems high for that specific variation on |
What does this pull request do?
it adds function similar to https://package.elm-lang.org/packages/elm/json/latest/Json-Encode#encode
this pr consumes #29 and #23
the difference is:
...space
alias, and not...indent
, but...indentation
, because I prefer full name...space
it adds
stringifyWithIndentation
function