Skip to content

Instantly share code, notes, and snippets.

@thanos
Forked from davidcoallier/custom-002.erl
Created January 19, 2012 22:37
Show Gist options
  • Save thanos/1643401 to your computer and use it in GitHub Desktop.
Save thanos/1643401 to your computer and use it in GitHub Desktop.
fun({Doc}) ->
case {proplists:get_value(<<"name">>, Doc), proplists:get_value(<<"value">>, Doc)} of
{undefined, _} ->
ok;
{_, undefined} ->
ok;
{Name, Value} ->
Emit(Name, {Doc});
_ ->
ok
end
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment