Skip to content

Instantly share code, notes, and snippets.

@davidcoallier
Created April 12, 2010 09:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save davidcoallier/363396 to your computer and use it in GitHub Desktop.
Save davidcoallier/363396 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