millermedeiros / amd-utils

modular JavaScript utilities written in the AMD format
http://millermedeiros.github.com/amd-utils
142 stars 11 forks source link

Add array/flatten #59

Closed conradz closed 12 years ago

conradz commented 12 years ago

I added the utility method array/flatten, to recursively flatten the arrays. For some reason I couldn't get the build to work, It would say TypeError: object is not a function at this line. I wrote some tests for it and they pass.

millermedeiros commented 12 years ago

@conradz it seems that handlebars updated the registerHelper API so now it accepts an options object as second argument that contains the .fn() property. I will update the build script and package.json.

Thanks for the pull requests, will merge it soon.

millermedeiros commented 12 years ago

@conradz I just updated the build file. Can you try to run it? Also could you provide with the documentation for each method? The source files are inside the _build/doc/content folder (kinda hidden, should probably move them to another place..). Thanks!

conradz commented 12 years ago

OK, added the documentation and ran the build. I had thought that the documentation got updated from the /** comments.

conradz commented 12 years ago

@millermedeiros Are you going to pull these in? I think they are ready to be merged in.

millermedeiros commented 12 years ago

@conradz thanks for the contributions!