Skip to content
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

feat(#91): add decoder for NonEmptyString #94

Merged
merged 4 commits into from
Dec 24, 2020

Conversation

srghma
Copy link
Member

@srghma srghma commented Dec 23, 2020

Description of the change

feat(#91): add decoder for NonEmptyString

Checklist:

  • Added the change to the changelog's "Unreleased" section with a link to this PR and your username
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation in the README and/or documentation directory
  • Added a test for the contribution (if applicable)

Comment on lines 94 to 95
decodeNonempty :: Json -> Either JsonDecodeError String
decodeNonempty = map NonEmptyString.toString <<< decodeNonEmptyString
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather not include this function; it's pretty easy to do map NonEmptyString.toString in your own code and we don't otherwise provide functions beyond the initial parse in the library.

pure Nothing
else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did all these come from? 😅 Thanks for trimming the whitespace.

@srghma
Copy link
Member Author

srghma commented Dec 24, 2020

Done

@thomashoneyman thomashoneyman merged commit 95a324d into purescript-contrib:main Dec 24, 2020
@thomashoneyman
Copy link
Contributor

@srghma I won’t be able to make a new release containing this new function until we make the library releases for 0.14. However it’ll be available at that point!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants