{"action":"created","comment":{"url":"https://api.github.com/repos/stampit-org/stamp-specification/pulls/comments/40876230","id":40876230,"diff_hunk":"@@ -127,27 +126,77 @@ const myStamp = compose(config, warnOnCollisions);\n ```\n \n \n-### Stamp `options` Reserved Keys\n+### Stamp Options\n \n-The following are reserved keys for the stamp options object:\n+It is recommended that stamp initializers only use one argument: The stamp `options` argument. There are no reserved properties and no special meaning. However, using multiple arguments for a stamp could create conflicts where multiple stamps expect the same argument to mean different things. Using named parameters, it's possible for stamp creator to resolve conflicts with `options` namespacing. For example, if you want to compose a database connection stamp with a message queue stamp:\n \n ```js\n-{\n-  instance // The object to be mutated by the stamp\n-}\n+const db = dbStamp({\n+  host: 'localhost',\n+  port: 3000,\n+  onConnect() {\n+    console.log('Database connection established.');\n+  }\n+});\n+\n+const queue = messageQueueStamp({\n+  host: 'localhost',\n+  port: 5000,\n+  onComplete() {\n+    console.log('Message queue connection established.');\n+  }\n+});\n+```\n+\n+If you tried to compose these directly, they would conflict with eachother, but it's easy to namespace the options at compose time:\n+\n+```js\n+const DbQueue = compose({\n+  initializers: [({db, queue}, { instance }) => {\n+    instance.db = dbStamp({\n+      host: db.host,\n+      port: db.port,\n+      onConnect: db.onConnect\n+    });\n+    instance.queue = messageQueueStamp({\n+      host: queue.host,\n+      port: queue.port,\n+      onConnect: queue.onConnect\n+    });\n+  }]\n+});\n+\n+myDBQueue = DbQueue({\n+  db: {\n+    host: 'localhost',\n+    port: 3000,\n+    onConnect () {\n+      console.log('Database connection established.');\n+    }\n+  },\n+  queue: {\n+    host: 'localhost',\n+    port: 5000,\n+    onConnect () {\n+      console.log('Message queue connection established.');\n+    }\n+  }\n+});\n ```\n \n+\n ### Initializer Parameters\n \n Initializers have the following signature:\n \n ```js\n-(options, { instance, stamp }) => instance\n+(options, { instance, stamp, args }) => instance\n ```\n \n * `options` The `options` argument passed into the stamp, containing propreties that may be used by initializers.\n-* `instance` The object instance being produced by the stamp. If the initializer returns a new object, it replaces the instance.\n+* `instance` The object instance being produced by the stamp. If the initializer returns a new object, it replaces the instance for subsequent initializer calls.\n * `stamp` A reference to the stamp producing the instance.\n+* `args` An array of the arguments passed into the stamp, including the `options` argument.","path":"README.md","position":105,"original_position":105,"commit_id":"bd6977f4c5f320afad34f8be26827c6f7cad8a0c","original_commit_id":"bd6977f4c5f320afad34f8be26827c6f7cad8a0c","user":{"login":"koresar","id":1622575,"avatar_url":"https://avatars.githubusercontent.com/u/1622575?v=3","gravatar_id":"","url":"https://api.github.com/users/koresar","html_url":"https://github.com/koresar","followers_url":"https://api.github.com/users/koresar/followers","following_url":"https://api.github.com/users/koresar/following{/other_user}","gists_url":"https://api.github.com/users/koresar/gists{/gist_id}","starred_url":"https://api.github.com/users/koresar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koresar/subscriptions","organizations_url":"https://api.github.com/users/koresar/orgs","repos_url":"https://api.github.com/users/koresar/repos","events_url":"https://api.github.com/users/koresar/events{/privacy}","received_events_url":"https://api.github.com/users/koresar/received_events","type":"User","site_admin":false},"body":"Sorry, probably I'm missing a message somewhere, but still.\r\nHow do you propose to pass stamp into an initializer?","created_at":"2015-10-01T03:19:36Z","updated_at":"2015-10-01T03:19:36Z","html_url":"https://github.com/stampit-org/stamp-specification/pull/38#discussion_r40876230","pull_request_url":"https://api.github.com/repos/stampit-org/stamp-specification/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/stampit-org/stamp-specification/pulls/comments/40876230"},"html":{"href":"https://github.com/stampit-org/stamp-specification/pull/38#discussion_r40876230"},"pull_request":{"href":"https://api.github.com/repos/stampit-org/stamp-specification/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/stampit-org/stamp-specification/pulls/38","id":46476598,"html_url":"https://github.com/stampit-org/stamp-specification/pull/38","diff_url":"https://github.com/stampit-org/stamp-specification/pull/38.diff","patch_url":"https://github.com/stampit-org/stamp-specification/pull/38.patch","issue_url":"https://api.github.com/repos/stampit-org/stamp-specification/issues/38","number":38,"state":"open","locked":false,"title":"[#35, #37] Remove `instance` behavior","user":{"login":"ericelliott","id":364727,"avatar_url":"https://avatars.githubusercontent.com/u/364727?v=3","gravatar_id":"","url":"https://api.github.com/users/ericelliott","html_url":"https://github.com/ericelliott","followers_url":"https://api.github.com/users/ericelliott/followers","following_url":"https://api.github.com/users/ericelliott/following{/other_user}","gists_url":"https://api.github.com/users/ericelliott/gists{/gist_id}","starred_url":"https://api.github.com/users/ericelliott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericelliott/subscriptions","organizations_url":"https://api.github.com/users/ericelliott/orgs","repos_url":"https://api.github.com/users/ericelliott/repos","events_url":"https://api.github.com/users/ericelliott/events{/privacy}","received_events_url":"https://api.github.com/users/ericelliott/received_events","type":"User","site_admin":false},"body":"Discussions in #35 and #37:\r\n\r\nSince it would be trivial to implement `instance` mutation as a stamp, it makes sense to strip it from the stamp spec to simplify things and eliminate any need for reserved properties.\r\n\r\nI believe it's still a very good idea to encourage the use of a single `options` object, so that will remain part of the spec.","created_at":"2015-10-01T01:28:00Z","updated_at":"2015-10-01T03:19:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc24e0fed7c5f1ebcb33511094c9aede8023a175","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/stampit-org/stamp-specification/pulls/38/commits","review_comments_url":"https://api.github.com/repos/stampit-org/stamp-specification/pulls/38/comments","review_comment_url":"https://api.github.com/repos/stampit-org/stamp-specification/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stampit-org/stamp-specification/issues/38/comments","statuses_url":"https://api.github.com/repos/stampit-org/stamp-specification/statuses/bd6977f4c5f320afad34f8be26827c6f7cad8a0c","head":{"label":"stampit-org:ericelliott-remove-instance","ref":"ericelliott-remove-instance","sha":"bd6977f4c5f320afad34f8be26827c6f7cad8a0c","user":{"login":"stampit-org","id":12635305,"avatar_url":"https://avatars.githubusercontent.com/u/12635305?v=3","gravatar_id":"","url":"https://api.github.com/users/stampit-org","html_url":"https://github.com/stampit-org","followers_url":"https://api.github.com/users/stampit-org/followers","following_url":"https://api.github.com/users/stampit-org/following{/other_user}","gists_url":"https://api.github.com/users/stampit-org/gists{/gist_id}","starred_url":"https://api.github.com/users/stampit-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stampit-org/subscriptions","organizations_url":"https://api.github.com/users/stampit-org/orgs","repos_url":"https://api.github.com/users/stampit-org/repos","events_url":"https://api.github.com/users/stampit-org/events{/privacy}","received_events_url":"https://api.github.com/users/stampit-org/received_events","type":"Organization","site_admin":false},"repo":{"id":38865095,"name":"stamp-specification","full_name":"stampit-org/stamp-specification","owner":{"login":"stampit-org","id":12635305,"avatar_url":"https://avatars.githubusercontent.com/u/12635305?v=3","gravatar_id":"","url":"https://api.github.com/users/stampit-org","html_url":"https://github.com/stampit-org","followers_url":"https://api.github.com/users/stampit-org/followers","following_url":"https://api.github.com/users/stampit-org/following{/other_user}","gists_url":"https://api.github.com/users/stampit-org/gists{/gist_id}","starred_url":"https://api.github.com/users/stampit-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stampit-org/subscriptions","organizations_url":"https://api.github.com/users/stampit-org/orgs","repos_url":"https://api.github.com/users/stampit-org/repos","events_url":"https://api.github.com/users/stampit-org/events{/privacy}","received_events_url":"https://api.github.com/users/stampit-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stampit-org/stamp-specification","description":"The Composables specification.","fork":false,"url":"https://api.github.com/repos/stampit-org/stamp-specification","forks_url":"https://api.github.com/repos/stampit-org/stamp-specification/forks","keys_url":"https://api.github.com/repos/stampit-org/stamp-specification/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stampit-org/stamp-specification/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stampit-org/stamp-specification/teams","hooks_url":"https://api.github.com/repos/stampit-org/stamp-specification/hooks","issue_events_url":"https://api.github.com/repos/stampit-org/stamp-specification/issues/events{/number}","events_url":"https://api.github.com/repos/stampit-org/stamp-specification/events","assignees_url":"https://api.github.com/repos/stampit-org/stamp-specification/assignees{/user}","branches_url":"https://api.github.com/repos/stampit-org/stamp-specification/branches{/branch}","tags_url":"https://api.github.com/repos/stampit-org/stamp-specification/tags","blobs_url":"https://api.github.com/repos/stampit-org/stamp-specification/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stampit-org/stamp-specification/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stampit-org/stamp-specification/git/refs{/sha}","trees_url":"https://api.github.com/repos/stampit-org/stamp-specification/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stampit-org/stamp-specification/statuses/{sha}","languages_url":"https://api.github.com/repos/stampit-org/stamp-specification/languages","stargazers_url":"https://api.github.com/repos/stampit-org/stamp-specification/stargazers","contributors_url":"https://api.github.com/repos/stampit-org/stamp-specification/contributors","subscribers_url":"https://api.github.com/repos/stampit-org/stamp-specification/subscribers","subscription_url":"https://api.github.com/repos/stampit-org/stamp-specification/subscription","commits_url":"https://api.github.com/repos/stampit-org/stamp-specification/commits{/sha}","git_commits_url":"https://api.github.com/repos/stampit-org/stamp-specification/git/commits{/sha}","comments_url":"https://api.github.com/repos/stampit-org/stamp-specification/comments{/number}","issue_comment_url":"https://api.github.com/repos/stampit-org/stamp-specification/issues/comments{/number}","contents_url":"https://api.github.com/repos/stampit-org/stamp-specification/contents/{+path}","compare_url":"https://api.github.com/repos/stampit-org/stamp-specification/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stampit-org/stamp-specification/merges","archive_url":"https://api.github.com/repos/stampit-org/stamp-specification/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stampit-org/stamp-specification/downloads","issues_url":"https://api.github.com/repos/stampit-org/stamp-specification/issues{/number}","pulls_url":"https://api.github.com/repos/stampit-org/stamp-specification/pulls{/number}","milestones_url":"https://api.github.com/repos/stampit-org/stamp-specification/milestones{/number}","notifications_url":"https://api.github.com/repos/stampit-org/stamp-specification/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stampit-org/stamp-specification/labels{/name}","releases_url":"https://api.github.com/repos/stampit-org/stamp-specification/releases{/id}","created_at":"2015-07-10T06:33:55Z","updated_at":"2015-09-30T18:07:59Z","pushed_at":"2015-10-01T01:28:01Z","git_url":"git://github.com/stampit-org/stamp-specification.git","ssh_url":"git@github.com:stampit-org/stamp-specification.git","clone_url":"https://github.com/stampit-org/stamp-specification.git","svn_url":"https://github.com/stampit-org/stamp-specification","homepage":"","size":511,"stargazers_count":50,"watchers_count":50,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":50,"default_branch":"master"}},"base":{"label":"stampit-org:master","ref":"master","sha":"f3b49b3b51e75e823b596895d826ac4e1f2e0f9f","user":{"login":"stampit-org","id":12635305,"avatar_url":"https://avatars.githubusercontent.com/u/12635305?v=3","gravatar_id":"","url":"https://api.github.com/users/stampit-org","html_url":"https://github.com/stampit-org","followers_url":"https://api.github.com/users/stampit-org/followers","following_url":"https://api.github.com/users/stampit-org/following{/other_user}","gists_url":"https://api.github.com/users/stampit-org/gists{/gist_id}","starred_url":"https://api.github.com/users/stampit-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stampit-org/subscriptions","organizations_url":"https://api.github.com/users/stampit-org/orgs","repos_url":"https://api.github.com/users/stampit-org/repos","events_url":"https://api.github.com/users/stampit-org/events{/privacy}","received_events_url":"https://api.github.com/users/stampit-org/received_events","type":"Organization","site_admin":false},"repo":{"id":38865095,"name":"stamp-specification","full_name":"stampit-org/stamp-specification","owner":{"login":"stampit-org","id":12635305,"avatar_url":"https://avatars.githubusercontent.com/u/12635305?v=3","gravatar_id":"","url":"https://api.github.com/users/stampit-org","html_url":"https://github.com/stampit-org","followers_url":"https://api.github.com/users/stampit-org/followers","following_url":"https://api.github.com/users/stampit-org/following{/other_user}","gists_url":"https://api.github.com/users/stampit-org/gists{/gist_id}","starred_url":"https://api.github.com/users/stampit-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stampit-org/subscriptions","organizations_url":"https://api.github.com/users/stampit-org/orgs","repos_url":"https://api.github.com/users/stampit-org/repos","events_url":"https://api.github.com/users/stampit-org/events{/privacy}","received_events_url":"https://api.github.com/users/stampit-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stampit-org/stamp-specification","description":"The Composables specification.","fork":false,"url":"https://api.github.com/repos/stampit-org/stamp-specification","forks_url":"https://api.github.com/repos/stampit-org/stamp-specification/forks","keys_url":"https://api.github.com/repos/stampit-org/stamp-specification/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stampit-org/stamp-specification/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stampit-org/stamp-specification/teams","hooks_url":"https://api.github.com/repos/stampit-org/stamp-specification/hooks","issue_events_url":"https://api.github.com/repos/stampit-org/stamp-specification/issues/events{/number}","events_url":"https://api.github.com/repos/stampit-org/stamp-specification/events","assignees_url":"https://api.github.com/repos/stampit-org/stamp-specification/assignees{/user}","branches_url":"https://api.github.com/repos/stampit-org/stamp-specification/branches{/branch}","tags_url":"https://api.github.com/repos/stampit-org/stamp-specification/tags","blobs_url":"https://api.github.com/repos/stampit-org/stamp-specification/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stampit-org/stamp-specification/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stampit-org/stamp-specification/git/refs{/sha}","trees_url":"https://api.github.com/repos/stampit-org/stamp-specification/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stampit-org/stamp-specification/statuses/{sha}","languages_url":"https://api.github.com/repos/stampit-org/stamp-specification/languages","stargazers_url":"https://api.github.com/repos/stampit-org/stamp-specification/stargazers","contributors_url":"https://api.github.com/repos/stampit-org/stamp-specification/contributors","subscribers_url":"https://api.github.com/repos/stampit-org/stamp-specification/subscribers","subscription_url":"https://api.github.com/repos/stampit-org/stamp-specification/subscription","commits_url":"https://api.github.com/repos/stampit-org/stamp-specification/commits{/sha}","git_commits_url":"https://api.github.com/repos/stampit-org/stamp-specification/git/commits{/sha}","comments_url":"https://api.github.com/repos/stampit-org/stamp-specification/comments{/number}","issue_comment_url":"https://api.github.com/repos/stampit-org/stamp-specification/issues/comments{/number}","contents_url":"https://api.github.com/repos/stampit-org/stamp-specification/contents/{+path}","compare_url":"https://api.github.com/repos/stampit-org/stamp-specification/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stampit-org/stamp-specification/merges","archive_url":"https://api.github.com/repos/stampit-org/stamp-specification/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stampit-org/stamp-specification/downloads","issues_url":"https://api.github.com/repos/stampit-org/stamp-specification/issues{/number}","pulls_url":"https://api.github.com/repos/stampit-org/stamp-specification/pulls{/number}","milestones_url":"https://api.github.com/repos/stampit-org/stamp-specification/milestones{/number}","notifications_url":"https://api.github.com/repos/stampit-org/stamp-specification/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stampit-org/stamp-specification/labels{/name}","releases_url":"https://api.github.com/repos/stampit-org/stamp-specification/releases{/id}","created_at":"2015-07-10T06:33:55Z","updated_at":"2015-09-30T18:07:59Z","pushed_at":"2015-10-01T01:28:01Z","git_url":"git://github.com/stampit-org/stamp-specification.git","ssh_url":"git@github.com:stampit-org/stamp-specification.git","clone_url":"https://github.com/stampit-org/stamp-specification.git","svn_url":"https://github.com/stampit-org/stamp-specification","homepage":"","size":511,"stargazers_count":50,"watchers_count":50,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":50,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stampit-org/stamp-specification/pulls/38"},"html":{"href":"https://github.com/stampit-org/stamp-specification/pull/38"},"issue":{"href":"https://api.github.com/repos/stampit-org/stamp-specification/issues/38"},"comments":{"href":"https://api.github.com/repos/stampit-org/stamp-specification/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/stampit-org/stamp-specification/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/stampit-org/stamp-specification/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stampit-org/stamp-specification/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/stampit-org/stamp-specification/statuses/bd6977f4c5f320afad34f8be26827c6f7cad8a0c"}}}}