Documenting factories with JSDoc
问题 In order to avoid using new in my JavaScript code, I write factories to create objects. I have tried many combinations and the one that gives me the most satisfactory result is the following: /** * Document module * @module app/document */ (function () { 'use strict'; /** * Factory that creates a document object. * @alias module:app/document.factory * @return {document} */ function document() { /** * Get document id * @method id * @return {String} */ var id = function id() {...}, api = { id: