Generalize _.compact #990

Closed
wants to merge 4 commits into
from

Conversation

Projects
None yet
2 participants
@victorquinn

Generalize _.compact to work on any Collection, not just Arrays.

@jashkenas

This comment has been minimized.

Show comment Hide comment
@jashkenas

jashkenas Jul 6, 2013

Owner

Interesting, but "compact"-ing an object that happens to have a few null values is a bit of a strange notion. And one probably not appropriate for Underscore.

More importantly, your PR uses Object.keys, which won't work in (old) IE.

Owner

jashkenas commented Jul 6, 2013

Interesting, but "compact"-ing an object that happens to have a few null values is a bit of a strange notion. And one probably not appropriate for Underscore.

More importantly, your PR uses Object.keys, which won't work in (old) IE.

@jashkenas jashkenas closed this Jul 6, 2013

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