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

What about a RA.isNotEmptyArray ? #279

Closed
guillaumearm opened this issue Jan 15, 2018 · 9 comments
Closed

What about a RA.isNotEmptyArray ? #279

guillaumearm opened this issue Jan 15, 2018 · 9 comments
Assignees
Labels
Milestone

Comments

@guillaumearm
Copy link
Collaborator

guillaumearm commented Jan 15, 2018

Hello everyone,

Frequently, I implement myself a isNotEmptyArray function :

const isNotEmptyArray = R.both(RA.isArray, RA.isNotEmpty);

I think I'm not alone to doing that, maybe I could make a PR for adding this function ?

We should add isEmptyArray, isEmptyObject and isNotEmptyObject too.

@char0n
Copy link
Owner

char0n commented Jan 16, 2018

Yes, I have the same usecase in the current codebase I'm working on. But I'd go for a following naming:
isEmptyArray, isNonEmptyArray.

Why ? You can read more about why here: #40

#40 is also dealing with isEmptyString and isNonEmptyString.

You can own both this and #40 issue and make them realize ;]

@char0n char0n added the feature label Jan 16, 2018
@char0n char0n added this to the v2.4.0 milestone Jan 16, 2018
@char0n
Copy link
Owner

char0n commented Jan 16, 2018

@guillaumearm I've assigned this issue to v2.4.0 milestone. Feel free to provide PR.

@guillaumearm
Copy link
Collaborator Author

guillaumearm commented Jan 16, 2018

Yup, i prefer the 'isNonEmpty' terminology too.

PR coming tommorow ;-)

and I would like to say ramda-adjunct is an awesome library, the missing piece of ramda.

Thank you for your work.

@char0n
Copy link
Owner

char0n commented Jan 16, 2018

Thanks, and you'll be the next one to make it even better ;]

Please make two separate PRs for isEmptyArray and isNonEmptyArray. Check out this PR as an example of how a PR should look like.

@guillaumearm
Copy link
Collaborator Author

And what do you think about isEmptyObject and isNonEmptyObject ?

@char0n
Copy link
Owner

char0n commented Jan 17, 2018

@guillaumearm let's continue object discussion here #283

guillaumearm pushed a commit to guillaumearm/ramda-adjunct that referenced this issue Jan 17, 2018
guillaumearm pushed a commit to guillaumearm/ramda-adjunct that referenced this issue Jan 17, 2018
This was referenced Jan 17, 2018
guillaumearm pushed a commit to guillaumearm/ramda-adjunct that referenced this issue Jan 18, 2018
guillaumearm pushed a commit to guillaumearm/ramda-adjunct that referenced this issue Jan 18, 2018
guillaumearm pushed a commit to guillaumearm/ramda-adjunct that referenced this issue Jan 18, 2018
according to char0n#279, checking if something is array is simpler then checking if an value is empty.
guillaumearm pushed a commit to guillaumearm/ramda-adjunct that referenced this issue Jan 18, 2018
guillaumearm pushed a commit to guillaumearm/ramda-adjunct that referenced this issue Jan 18, 2018
guillaumearm pushed a commit to guillaumearm/ramda-adjunct that referenced this issue Jan 18, 2018
according to char0n#279, checking if something is array is simpler then checking if an value is not empty.
char0n pushed a commit that referenced this issue Jan 19, 2018
@char0n char0n closed this as completed in 464060e Jan 19, 2018
@char0n
Copy link
Owner

char0n commented Jan 20, 2018

From some reason I don't see isNotEmptyArray in generated docs for v2.4.0 https://char0n.github.io/ramda-adjunct/2.4.0/index.html

@char0n char0n reopened this Jan 20, 2018
@guillaumearm
Copy link
Collaborator Author

guillaumearm commented Jan 20, 2018

@char0n
Copy link
Owner

char0n commented Jan 20, 2018

Of course ;]

@char0n char0n closed this as completed Jan 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants