ramda/ramda — pull request #609 by kedashoe (2014-11-27 02:14:35+00:00)
Title: refactor example test runner to separate out doc parsing

I've split out the document parsing from running the example tests. I put `doc-parser.js` in `scripts`, is that a good place for it?

Now from anywhere you can do

`var ramdaDocs = require('path/to/doc-parser');`

and you get an array back of objects representing the docs for a given function. Objects are of the form

{
name: 'countBy',
func: '',
memberOf: 'R',
category: [ 'relation' ],
sig: '(a -> String) -> [a] -> {*}',
param: [ [ 'Function' ], [ 'Array' ] ],
return: [ 'Object' ],
example: '\n var numbers = [1.0, 1.1, 1.2, 2.0, 3.0, 2.2];\n var letters = R.split(\'\', \'abcABCaaaBBc\');\n R.countBy(Math.floor)(numbers); //=> {\'1\': 3, \'2\': 2, \'3\': 1}\n R.countBy(R.toLowerCase)(letters); //=> {\'a\': 5, \'b\': 4, \'c\': 3}',
description: '

Counts the elements of a list according to how many match each value
of a key generated by the supplied function. Returns an object
mapping the keys produced by fn to the number of occurrences in
the list. Note that all keys are coerced to strings because of how
JavaScript objects work.

',
isPrivate: false,
isConstructor: false,
isEvent: false,
ignore: false,
line: 6092,
codeStart: 6113
}

This is slight re-organization of what you get back from `dox`. Might be more useful to index by function name? Anyway more stuff could be done here, but hopefully this is a decent start and something useful.