You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Chris Anderson (JIRA)" <ji...@apache.org> on 2008/05/20 09:01:55 UTC

[jira] Commented: (COUCHDB-57) Javascript helper functions for use in map and reduce functions

    [ https://issues.apache.org/jira/browse/COUCHDB-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598203#action_12598203 ] 

Chris Anderson commented on COUCHDB-57:
---------------------------------------

playing with Spidermonkey more and realized that my collect() is available natively as myarray.map(). The unique() function should still be useful.

> 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.