{"action":"created","issue":{"url":"https://api.github.com/repos/bebraw/libumd/issues/14","labels_url":"https://api.github.com/repos/bebraw/libumd/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/bebraw/libumd/issues/14/comments","events_url":"https://api.github.com/repos/bebraw/libumd/issues/14/events","html_url":"https://github.com/bebraw/libumd/issues/14","id":106502252,"number":14,"title":"Influencing the factory function argument names","user":{"login":"Download","id":153391,"avatar_url":"https://avatars.githubusercontent.com/u/153391?v=3","gravatar_id":"","url":"https://api.github.com/users/Download","html_url":"https://github.com/Download","followers_url":"https://api.github.com/users/Download/followers","following_url":"https://api.github.com/users/Download/following{/other_user}","gists_url":"https://api.github.com/users/Download/gists{/gist_id}","starred_url":"https://api.github.com/users/Download/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Download/subscriptions","organizations_url":"https://api.github.com/users/Download/orgs","repos_url":"https://api.github.com/users/Download/repos","events_url":"https://api.github.com/users/Download/events{/privacy}","received_events_url":"https://api.github.com/users/Download/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":34,"created_at":"2015-09-15T07:52:35Z","updated_at":"2015-10-01T13:27:08Z","closed_at":null,"body":"I'm using libumd (through [grunt-umd](https://github.com/bebraw/grunt-umd)) to create an UMD module that depends on another UMD module named `memorystorage`, that exports a default function called `MemoryStorage`. Libumd ends up naming the function parameter `memorystorage` (all lowercase) but I would like it to use `MemoryStorage` instead. \r\n\r\nHere is my config:\r\n\r\n```javascript\r\numd: {\r\n\tall: {\r\n\t\toptions: {\r\n\t\t\tsrc: '<%= pkg.main %>',\r\n\t\t\tdest: '<%= pkg.dist.umd %>', \r\n\t\t\tobjectToExport: '<%= pkg.exports[0] %>',\r\n\t\t\tamdModuleId: '<%= pkg.name %>',\r\n\t\t\tdeps: {'default': ['memorystorage']}\r\n\t\t}\r\n\t}\r\n},\r\n```\r\nThe output looks like this:\r\n```javascript\r\n(function (root, factory) {\r\n  if (typeof define === 'function' && define.amd) {\r\n    // AMD. Register as an anonymous module unless amdModuleId is set\r\n    define('webdb', [\"memorystorage\"], function (a0) {\r\n      return (root['WebDB'] = factory(a0));\r\n    });\r\n  } else if (typeof exports === 'object') {\r\n    // Node. Does not work with strict CommonJS, but\r\n    // only CommonJS-like environments that support module.exports,\r\n    // like Node.\r\n    module.exports = factory(require(\"memorystorage\"));\r\n  } else {\r\n    root['WebDB'] = factory(memorystorage);\r\n  }\r\n}(this, function (memorystorage) {\r\n\r\n  // my code comes here\r\n\r\n}));\r\n```\r\n\r\nThe problem is on the last line before my code:\r\n\r\n```javascript\r\n}(this, function (memorystorage) {\r\n```\r\n\r\nI want this line to read:\r\n\r\n```javascript\r\n}(this, function (MemoryStorage) {\r\n```\r\n\r\nIs there a way for me to influence what the function argument names will be?\r\n\r\nI also asked [this same question](https://github.com/bebraw/grunt-umd/issues/29) on the grunt-umd issue list. The author thinks it would require changes here. \r\n\r\nIt seems like a common scenario... Any tricks to make this work?\r\n"},"comment":{"url":"https://api.github.com/repos/bebraw/libumd/issues/comments/144725791","html_url":"https://github.com/bebraw/libumd/issues/14#issuecomment-144725791","issue_url":"https://api.github.com/repos/bebraw/libumd/issues/14","id":144725791,"user":{"login":"bebraw","id":166921,"avatar_url":"https://avatars.githubusercontent.com/u/166921?v=3","gravatar_id":"","url":"https://api.github.com/users/bebraw","html_url":"https://github.com/bebraw","followers_url":"https://api.github.com/users/bebraw/followers","following_url":"https://api.github.com/users/bebraw/following{/other_user}","gists_url":"https://api.github.com/users/bebraw/gists{/gist_id}","starred_url":"https://api.github.com/users/bebraw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bebraw/subscriptions","organizations_url":"https://api.github.com/users/bebraw/orgs","repos_url":"https://api.github.com/users/bebraw/repos","events_url":"https://api.github.com/users/bebraw/events{/privacy}","received_events_url":"https://api.github.com/users/bebraw/received_events","type":"User","site_admin":false},"created_at":"2015-10-01T13:27:07Z","updated_at":"2015-10-01T13:27:07Z","body":"@Download Any luck? Tests pass and as far as I understand we should be good to go with a release. Best of all it's all backwards compatible."}}