{"action":"created","comment":{"url":"https://api.github.com/repos/stampit-org/stampit/pulls/comments/32390199","id":32390199,"diff_hunk":"@@ -0,0 +1,409 @@\n+<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n+<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n+**Table of Contents**\n+\n+- [`object.getStamp()`. 2 ways.](#objectgetstamp-2-ways)\n+  - [First way](#first-way)\n+  - [Second way](#second-way)\n+- [Self cloneable objects. 3 ways.](#self-cloneable-objects-3-ways)\n+  - [A composable stamp which adds `.clone()` to objects](#a-composable-stamp-which-adds-clone-to-objects)\n+  - [Another way of self cloning](#another-way-of-self-cloning)\n+  - [Memory efficient cloning](#memory-efficient-cloning)\n+- [Delayed object instantiation using Promises](#delayed-object-instantiation-using-promises)\n+- [Dependency injection tips](#dependency-injection-tips)\n+- [Validate before a function call](#validate-before-a-function-call)\n+- [EventEmitter without inheritance (`convertConstructor`)](#eventemitter-without-inheritance-convertconstructor)\n+- [Hacking stamps](#hacking-stamps)\n+  - [\"Default\" properties](#default-properties)\n+  - [\"Default\" properties as composable behavior](#default-properties-as-composable-behavior)\n+\n+<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n+\n+\n+## `object.getStamp()`. 2 ways.\n+\n+> Run the examples below for yourself:","path":"ADVANCED_EXAMPLES.md","position":25,"original_position":25,"commit_id":"20eadb4be98e0c763b43a693c11d51b856b07fb4","original_commit_id":"20eadb4be98e0c763b43a693c11d51b856b07fb4","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":"Just before ## `object.getStamp()`. 2 ways.","created_at":"2015-06-15T03:31:22Z","updated_at":"2015-06-15T03:31:22Z","html_url":"https://github.com/stampit-org/stampit/pull/109#discussion_r32390199","pull_request_url":"https://api.github.com/repos/stampit-org/stampit/pulls/109","_links":{"self":{"href":"https://api.github.com/repos/stampit-org/stampit/pulls/comments/32390199"},"html":{"href":"https://github.com/stampit-org/stampit/pull/109#discussion_r32390199"},"pull_request":{"href":"https://api.github.com/repos/stampit-org/stampit/pulls/109"}}},"pull_request":{"url":"https://api.github.com/repos/stampit-org/stampit/pulls/109","id":37640076,"html_url":"https://github.com/stampit-org/stampit/pull/109","diff_url":"https://github.com/stampit-org/stampit/pull/109.diff","patch_url":"https://github.com/stampit-org/stampit/pull/109.patch","issue_url":"https://api.github.com/repos/stampit-org/stampit/issues/109","number":109,"state":"open","locked":false,"title":"Advanced examples","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":"Plentiful of tricks and tips. Please, correct my English.\r\nAlso, if something is unclear, please tell me! I want to make sure the text is easy to understand to as many people as possible.\r\nThanks!\r\n\r\nP.S. What do you think if we create a new repo (and npm module?) with \"cool stamps\" like those in the examples? (Cloneable, EventEmittable, ForcedDefaults, etc.)","created_at":"2015-06-14T11:30:55Z","updated_at":"2015-06-15T03:31:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5b154f1587061fa1aa1d5799ad3a86cac776ed59","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/stampit-org/stampit/pulls/109/commits","review_comments_url":"https://api.github.com/repos/stampit-org/stampit/pulls/109/comments","review_comment_url":"https://api.github.com/repos/stampit-org/stampit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stampit-org/stampit/issues/109/comments","statuses_url":"https://api.github.com/repos/stampit-org/stampit/statuses/20eadb4be98e0c763b43a693c11d51b856b07fb4","head":{"label":"stampit-org:advanced_examples","ref":"advanced_examples","sha":"20eadb4be98e0c763b43a693c11d51b856b07fb4","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":8124664,"name":"stampit","full_name":"stampit-org/stampit","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/stampit","description":"OOP is better with stamps: Composable object factories.","fork":false,"url":"https://api.github.com/repos/stampit-org/stampit","forks_url":"https://api.github.com/repos/stampit-org/stampit/forks","keys_url":"https://api.github.com/repos/stampit-org/stampit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stampit-org/stampit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stampit-org/stampit/teams","hooks_url":"https://api.github.com/repos/stampit-org/stampit/hooks","issue_events_url":"https://api.github.com/repos/stampit-org/stampit/issues/events{/number}","events_url":"https://api.github.com/repos/stampit-org/stampit/events","assignees_url":"https://api.github.com/repos/stampit-org/stampit/assignees{/user}","branches_url":"https://api.github.com/repos/stampit-org/stampit/branches{/branch}","tags_url":"https://api.github.com/repos/stampit-org/stampit/tags","blobs_url":"https://api.github.com/repos/stampit-org/stampit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stampit-org/stampit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stampit-org/stampit/git/refs{/sha}","trees_url":"https://api.github.com/repos/stampit-org/stampit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stampit-org/stampit/statuses/{sha}","languages_url":"https://api.github.com/repos/stampit-org/stampit/languages","stargazers_url":"https://api.github.com/repos/stampit-org/stampit/stargazers","contributors_url":"https://api.github.com/repos/stampit-org/stampit/contributors","subscribers_url":"https://api.github.com/repos/stampit-org/stampit/subscribers","subscription_url":"https://api.github.com/repos/stampit-org/stampit/subscription","commits_url":"https://api.github.com/repos/stampit-org/stampit/commits{/sha}","git_commits_url":"https://api.github.com/repos/stampit-org/stampit/git/commits{/sha}","comments_url":"https://api.github.com/repos/stampit-org/stampit/comments{/number}","issue_comment_url":"https://api.github.com/repos/stampit-org/stampit/issues/comments{/number}","contents_url":"https://api.github.com/repos/stampit-org/stampit/contents/{+path}","compare_url":"https://api.github.com/repos/stampit-org/stampit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stampit-org/stampit/merges","archive_url":"https://api.github.com/repos/stampit-org/stampit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stampit-org/stampit/downloads","issues_url":"https://api.github.com/repos/stampit-org/stampit/issues{/number}","pulls_url":"https://api.github.com/repos/stampit-org/stampit/pulls{/number}","milestones_url":"https://api.github.com/repos/stampit-org/stampit/milestones{/number}","notifications_url":"https://api.github.com/repos/stampit-org/stampit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stampit-org/stampit/labels{/name}","releases_url":"https://api.github.com/repos/stampit-org/stampit/releases{/id}","created_at":"2013-02-10T16:20:49Z","updated_at":"2015-06-15T01:01:41Z","pushed_at":"2015-06-14T23:48:28Z","git_url":"git://github.com/stampit-org/stampit.git","ssh_url":"git@github.com:stampit-org/stampit.git","clone_url":"https://github.com/stampit-org/stampit.git","svn_url":"https://github.com/stampit-org/stampit","homepage":"http://pjabook.com","size":1384,"stargazers_count":937,"watchers_count":937,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":18,"forks":45,"open_issues":18,"watchers":937,"default_branch":"master"}},"base":{"label":"stampit-org:master","ref":"master","sha":"439ec0d687e6000d4949011c9d1156ad42215dbb","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":8124664,"name":"stampit","full_name":"stampit-org/stampit","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/stampit","description":"OOP is better with stamps: Composable object factories.","fork":false,"url":"https://api.github.com/repos/stampit-org/stampit","forks_url":"https://api.github.com/repos/stampit-org/stampit/forks","keys_url":"https://api.github.com/repos/stampit-org/stampit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stampit-org/stampit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stampit-org/stampit/teams","hooks_url":"https://api.github.com/repos/stampit-org/stampit/hooks","issue_events_url":"https://api.github.com/repos/stampit-org/stampit/issues/events{/number}","events_url":"https://api.github.com/repos/stampit-org/stampit/events","assignees_url":"https://api.github.com/repos/stampit-org/stampit/assignees{/user}","branches_url":"https://api.github.com/repos/stampit-org/stampit/branches{/branch}","tags_url":"https://api.github.com/repos/stampit-org/stampit/tags","blobs_url":"https://api.github.com/repos/stampit-org/stampit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stampit-org/stampit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stampit-org/stampit/git/refs{/sha}","trees_url":"https://api.github.com/repos/stampit-org/stampit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stampit-org/stampit/statuses/{sha}","languages_url":"https://api.github.com/repos/stampit-org/stampit/languages","stargazers_url":"https://api.github.com/repos/stampit-org/stampit/stargazers","contributors_url":"https://api.github.com/repos/stampit-org/stampit/contributors","subscribers_url":"https://api.github.com/repos/stampit-org/stampit/subscribers","subscription_url":"https://api.github.com/repos/stampit-org/stampit/subscription","commits_url":"https://api.github.com/repos/stampit-org/stampit/commits{/sha}","git_commits_url":"https://api.github.com/repos/stampit-org/stampit/git/commits{/sha}","comments_url":"https://api.github.com/repos/stampit-org/stampit/comments{/number}","issue_comment_url":"https://api.github.com/repos/stampit-org/stampit/issues/comments{/number}","contents_url":"https://api.github.com/repos/stampit-org/stampit/contents/{+path}","compare_url":"https://api.github.com/repos/stampit-org/stampit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stampit-org/stampit/merges","archive_url":"https://api.github.com/repos/stampit-org/stampit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stampit-org/stampit/downloads","issues_url":"https://api.github.com/repos/stampit-org/stampit/issues{/number}","pulls_url":"https://api.github.com/repos/stampit-org/stampit/pulls{/number}","milestones_url":"https://api.github.com/repos/stampit-org/stampit/milestones{/number}","notifications_url":"https://api.github.com/repos/stampit-org/stampit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stampit-org/stampit/labels{/name}","releases_url":"https://api.github.com/repos/stampit-org/stampit/releases{/id}","created_at":"2013-02-10T16:20:49Z","updated_at":"2015-06-15T01:01:41Z","pushed_at":"2015-06-14T23:48:28Z","git_url":"git://github.com/stampit-org/stampit.git","ssh_url":"git@github.com:stampit-org/stampit.git","clone_url":"https://github.com/stampit-org/stampit.git","svn_url":"https://github.com/stampit-org/stampit","homepage":"http://pjabook.com","size":1384,"stargazers_count":937,"watchers_count":937,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":18,"forks":45,"open_issues":18,"watchers":937,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stampit-org/stampit/pulls/109"},"html":{"href":"https://github.com/stampit-org/stampit/pull/109"},"issue":{"href":"https://api.github.com/repos/stampit-org/stampit/issues/109"},"comments":{"href":"https://api.github.com/repos/stampit-org/stampit/issues/109/comments"},"review_comments":{"href":"https://api.github.com/repos/stampit-org/stampit/pulls/109/comments"},"review_comment":{"href":"https://api.github.com/repos/stampit-org/stampit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stampit-org/stampit/pulls/109/commits"},"statuses":{"href":"https://api.github.com/repos/stampit-org/stampit/statuses/20eadb4be98e0c763b43a693c11d51b856b07fb4"}}}}