couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "View_Snippets" by MarkusJelsma
Date Fri, 22 Jan 2010 21:24:35 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "View_Snippets" page has been changed by MarkusJelsma.
The comment on this change is: Updated documents_without_a_field, now uses === void 0 instead
of "undefined", thanks to Adam Wolff.
http://wiki.apache.org/couchdb/View_Snippets?action=diff&rev1=31&rev2=32

--------------------------------------------------

  map
  function(doc)
  {
-   if (doc.field == "undefined")
+   if (doc.field === void 0)
    {
      emit(doc.id, null);
    }
@@ -695, +695 @@

    for (idx in fields)
    {
      // Does the current field exists?
-     if (typeof eval("doc." + fields[idx]) == "undefined")
+     if (typeof eval("doc." + fields[idx]) === void 0)
      {
        // It doesn't, emit the field name as key
        emit(fields[idx], null);

Mime
View raw message