jdalton / docdown

A simple JSDoc to Markdown generator.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Object function toString() has no method 'push' in generator.js

jmakeig opened this issue · comments

After shrinkwrapping to lodash/lodash@faddd94 to get past #20, using the example script

var docdown = require('docdown');

var filepath = '/path/to/project/lib/QueryBuilder.sjs';

// generate Markdown
var markdown = docdown({
  'path': filepath,
  'url': 'https://github.com/username/project/blob/master/my.js'
});

I'm getting the following error:

/path/to/project/node_modules/docdown/lib/generator.js:177
        tocGroup.push(entry);
                 ^
TypeError: Object function toString() { [native code] } has no method 'push'
    at /path/to/project/node_modules/docdown/lib/generator.js:177:18
    at arrayEach (/path/to/project/node_modules/docdown/node_modules/lodash/dist/lodash.js:295:11)
    at Function.forEach (/path/to/project/node_modules/docdown/node_modules/lodash/dist/lodash.js:5301:11)
    at generateDoc (/path/to/project/node_modules/docdown/lib/generator.js:141:5)
    at docdown (/path/to/project/sojourns/node_modules/docdown/index.js:30:10)
    at Object.<anonymous> (/path/to/project/sojourns/docs.js:6:16)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

I know both this and lodash are using pre-release versions here, but I'd like to help them get them working together. Any help would be much appreciated.

OS X 10.9.5
Node 0.10.31
npm 1.4.23

Thanks, I’ll try to fix this ASAP.