Return-Path: Delivered-To: apmail-incubator-couchdb-dev-archive@locus.apache.org Received: (qmail 66148 invoked from network); 20 May 2008 06:42:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 May 2008 06:42:27 -0000 Received: (qmail 97551 invoked by uid 500); 20 May 2008 06:42:28 -0000 Delivered-To: apmail-incubator-couchdb-dev-archive@incubator.apache.org Received: (qmail 97524 invoked by uid 500); 20 May 2008 06:42:28 -0000 Mailing-List: contact couchdb-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-dev@incubator.apache.org Delivered-To: mailing list couchdb-dev@incubator.apache.org Received: (qmail 97511 invoked by uid 99); 20 May 2008 06:42:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 May 2008 23:42:28 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 May 2008 06:41:34 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EE713234C11A for ; Mon, 19 May 2008 23:41:55 -0700 (PDT) Message-ID: <774459320.1211265715975.JavaMail.jira@brutus> Date: Mon, 19 May 2008 23:41:55 -0700 (PDT) From: "Chris Anderson (JIRA)" To: couchdb-dev@incubator.apache.org Subject: [jira] Updated: (COUCHDB-57) Javascript helper functions for use in map and reduce functions In-Reply-To: <308584628.1211265596386.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-57?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris Anderson updated COUCHDB-57: ---------------------------------- Attachment: js_helpers.diff the content of the helper functions > Javascript helper functions for use in map and reduce functions > --------------------------------------------------------------- > > Key: COUCHDB-57 > URL: https://issues.apache.org/jira/browse/COUCHDB-57 > Project: CouchDB > Issue Type: Improvement > Components: JavaScript View Server > Reporter: Chris Anderson > Priority: Minor > Attachments: js_helpers.diff > > Original Estimate: 1h > Remaining Estimate: 1h > > I've been playing with Reduce, and enjoying it. I added a two functions: unique() and collect() - they are similar to sum() in that they transform arrays. Unique also has an option to provide a count of items found in the source array. > I just wanted to share these function with everyone and suggest that a helper namespace be established in the view server to contain functions like these. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.