{"action":"created","comment":{"url":"https://api.github.com/repos/dasilvacontin/subclass-error/pulls/comments/25300083","id":25300083,"diff_hunk":"@@ -1,37 +1,45 @@\n-\n-\n-// subclass-error.js\n-\n-\n-function SubclassError (name, error, props) {\n-\n-\tif (name === undefined) throw new Error (\"Name of subclass must be provided as first argument.\");\n-\tif (!(error instanceof Function)) {\n-\t\tprops = error;\n-\t\terror = Error;\n-\t}\n-\n-\tvar e = function (message) {\n-\n-\t\tthis.message = message;\n-\n-\t\t//stack \"hack\"\n-\t\tvar goodStack = (new Error ()).stack.split('\\n');\n-\t\tgoodStack.splice(1,1);\n-\t\tgoodStack[0] = name;\n-\t\tif (message) goodStack[0] += \": \"+message;\n-\t\tthis.stack = goodStack.join('\\n');\n-\n-\t}\n-\te.prototype = new error ();\t\n-\te.prototype.constructor = e;\n-\te.prototype.name = name;\n-\tfor (var prop in props) {\n-\t\te.prototype[prop] = props[prop];\n-\t}\n-\n-\treturn e;\n-\n-}\n-\n-module.exports = SubclassError;\n\\ No newline at end of file\n+(function (root, factory) {\n+    if (typeof define === 'function' && define.amd) {\n+        // AMD. Register as an anonymous module.\n+        define([], factory);\n+    } else if (typeof exports === 'object') {\n+        // Node. Does not work with strict CommonJS, but\n+        // only CommonJS-like environments that support module.exports,\n+        // like Node.\n+        module.exports = factory();\n+    } else {\n+        // Browser globals (root is window)\n+        root.returnExports = factory();","path":"subclass-error.js","position":50,"original_position":50,"commit_id":"d86b829f04d788a3d8eaa48896a84c4f38714567","original_commit_id":"d86b829f04d788a3d8eaa48896a84c4f38714567","user":{"login":"kenvunz","id":274309,"avatar_url":"https://avatars.githubusercontent.com/u/274309?v=3","gravatar_id":"","url":"https://api.github.com/users/kenvunz","html_url":"https://github.com/kenvunz","followers_url":"https://api.github.com/users/kenvunz/followers","following_url":"https://api.github.com/users/kenvunz/following{/other_user}","gists_url":"https://api.github.com/users/kenvunz/gists{/gist_id}","starred_url":"https://api.github.com/users/kenvunz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenvunz/subscriptions","organizations_url":"https://api.github.com/users/kenvunz/orgs","repos_url":"https://api.github.com/users/kenvunz/repos","events_url":"https://api.github.com/users/kenvunz/events{/privacy}","received_events_url":"https://api.github.com/users/kenvunz/received_events","type":"User","site_admin":false},"body":"duh, of course! that would not be very cool to have a `returnExports` as the global variable :smile: \r\n\r\ni'll get it sorted.","created_at":"2015-02-24T22:30:46Z","updated_at":"2015-02-24T22:30:46Z","html_url":"https://github.com/dasilvacontin/subclass-error/pull/1#discussion_r25300083","pull_request_url":"https://api.github.com/repos/dasilvacontin/subclass-error/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/dasilvacontin/subclass-error/pulls/comments/25300083"},"html":{"href":"https://github.com/dasilvacontin/subclass-error/pull/1#discussion_r25300083"},"pull_request":{"href":"https://api.github.com/repos/dasilvacontin/subclass-error/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/dasilvacontin/subclass-error/pulls/1","id":29798926,"html_url":"https://github.com/dasilvacontin/subclass-error/pull/1","diff_url":"https://github.com/dasilvacontin/subclass-error/pull/1.diff","patch_url":"https://github.com/dasilvacontin/subclass-error/pull/1.patch","issue_url":"https://api.github.com/repos/dasilvacontin/subclass-error/issues/1","number":1,"state":"open","locked":false,"title":"Wrap a `returnExports` UMD pattern","user":{"login":"kenvunz","id":274309,"avatar_url":"https://avatars.githubusercontent.com/u/274309?v=3","gravatar_id":"","url":"https://api.github.com/users/kenvunz","html_url":"https://github.com/kenvunz","followers_url":"https://api.github.com/users/kenvunz/followers","following_url":"https://api.github.com/users/kenvunz/following{/other_user}","gists_url":"https://api.github.com/users/kenvunz/gists{/gist_id}","starred_url":"https://api.github.com/users/kenvunz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenvunz/subscriptions","organizations_url":"https://api.github.com/users/kenvunz/orgs","repos_url":"https://api.github.com/users/kenvunz/repos","events_url":"https://api.github.com/users/kenvunz/events{/privacy}","received_events_url":"https://api.github.com/users/kenvunz/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-23T10:41:58Z","updated_at":"2015-02-24T22:30:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"624c8158ee0ac559880062cc34a8787b4f6ac7fc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dasilvacontin/subclass-error/pulls/1/commits","review_comments_url":"https://api.github.com/repos/dasilvacontin/subclass-error/pulls/1/comments","review_comment_url":"https://api.github.com/repos/dasilvacontin/subclass-error/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dasilvacontin/subclass-error/issues/1/comments","statuses_url":"https://api.github.com/repos/dasilvacontin/subclass-error/statuses/d86b829f04d788a3d8eaa48896a84c4f38714567","head":{"label":"kenvunz:master","ref":"master","sha":"d86b829f04d788a3d8eaa48896a84c4f38714567","user":{"login":"kenvunz","id":274309,"avatar_url":"https://avatars.githubusercontent.com/u/274309?v=3","gravatar_id":"","url":"https://api.github.com/users/kenvunz","html_url":"https://github.com/kenvunz","followers_url":"https://api.github.com/users/kenvunz/followers","following_url":"https://api.github.com/users/kenvunz/following{/other_user}","gists_url":"https://api.github.com/users/kenvunz/gists{/gist_id}","starred_url":"https://api.github.com/users/kenvunz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenvunz/subscriptions","organizations_url":"https://api.github.com/users/kenvunz/orgs","repos_url":"https://api.github.com/users/kenvunz/repos","events_url":"https://api.github.com/users/kenvunz/events{/privacy}","received_events_url":"https://api.github.com/users/kenvunz/received_events","type":"User","site_admin":false},"repo":{"id":31203412,"name":"subclass-error","full_name":"kenvunz/subclass-error","owner":{"login":"kenvunz","id":274309,"avatar_url":"https://avatars.githubusercontent.com/u/274309?v=3","gravatar_id":"","url":"https://api.github.com/users/kenvunz","html_url":"https://github.com/kenvunz","followers_url":"https://api.github.com/users/kenvunz/followers","following_url":"https://api.github.com/users/kenvunz/following{/other_user}","gists_url":"https://api.github.com/users/kenvunz/gists{/gist_id}","starred_url":"https://api.github.com/users/kenvunz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenvunz/subscriptions","organizations_url":"https://api.github.com/users/kenvunz/orgs","repos_url":"https://api.github.com/users/kenvunz/repos","events_url":"https://api.github.com/users/kenvunz/events{/privacy}","received_events_url":"https://api.github.com/users/kenvunz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kenvunz/subclass-error","description":"Workaround for subclassing errors. Both instanceof and stack are functional.","fork":true,"url":"https://api.github.com/repos/kenvunz/subclass-error","forks_url":"https://api.github.com/repos/kenvunz/subclass-error/forks","keys_url":"https://api.github.com/repos/kenvunz/subclass-error/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kenvunz/subclass-error/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kenvunz/subclass-error/teams","hooks_url":"https://api.github.com/repos/kenvunz/subclass-error/hooks","issue_events_url":"https://api.github.com/repos/kenvunz/subclass-error/issues/events{/number}","events_url":"https://api.github.com/repos/kenvunz/subclass-error/events","assignees_url":"https://api.github.com/repos/kenvunz/subclass-error/assignees{/user}","branches_url":"https://api.github.com/repos/kenvunz/subclass-error/branches{/branch}","tags_url":"https://api.github.com/repos/kenvunz/subclass-error/tags","blobs_url":"https://api.github.com/repos/kenvunz/subclass-error/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kenvunz/subclass-error/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kenvunz/subclass-error/git/refs{/sha}","trees_url":"https://api.github.com/repos/kenvunz/subclass-error/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kenvunz/subclass-error/statuses/{sha}","languages_url":"https://api.github.com/repos/kenvunz/subclass-error/languages","stargazers_url":"https://api.github.com/repos/kenvunz/subclass-error/stargazers","contributors_url":"https://api.github.com/repos/kenvunz/subclass-error/contributors","subscribers_url":"https://api.github.com/repos/kenvunz/subclass-error/subscribers","subscription_url":"https://api.github.com/repos/kenvunz/subclass-error/subscription","commits_url":"https://api.github.com/repos/kenvunz/subclass-error/commits{/sha}","git_commits_url":"https://api.github.com/repos/kenvunz/subclass-error/git/commits{/sha}","comments_url":"https://api.github.com/repos/kenvunz/subclass-error/comments{/number}","issue_comment_url":"https://api.github.com/repos/kenvunz/subclass-error/issues/comments{/number}","contents_url":"https://api.github.com/repos/kenvunz/subclass-error/contents/{+path}","compare_url":"https://api.github.com/repos/kenvunz/subclass-error/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kenvunz/subclass-error/merges","archive_url":"https://api.github.com/repos/kenvunz/subclass-error/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kenvunz/subclass-error/downloads","issues_url":"https://api.github.com/repos/kenvunz/subclass-error/issues{/number}","pulls_url":"https://api.github.com/repos/kenvunz/subclass-error/pulls{/number}","milestones_url":"https://api.github.com/repos/kenvunz/subclass-error/milestones{/number}","notifications_url":"https://api.github.com/repos/kenvunz/subclass-error/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kenvunz/subclass-error/labels{/name}","releases_url":"https://api.github.com/repos/kenvunz/subclass-error/releases{/id}","created_at":"2015-02-23T10:33:36Z","updated_at":"2015-02-23T10:41:05Z","pushed_at":"2015-02-23T10:41:05Z","git_url":"git://github.com/kenvunz/subclass-error.git","ssh_url":"git@github.com:kenvunz/subclass-error.git","clone_url":"https://github.com/kenvunz/subclass-error.git","svn_url":"https://github.com/kenvunz/subclass-error","homepage":null,"size":96,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dasilvacontin:master","ref":"master","sha":"db4f78b006f99b5a5a458577edc13b68cad5d656","user":{"login":"dasilvacontin","id":1260830,"avatar_url":"https://avatars.githubusercontent.com/u/1260830?v=3","gravatar_id":"","url":"https://api.github.com/users/dasilvacontin","html_url":"https://github.com/dasilvacontin","followers_url":"https://api.github.com/users/dasilvacontin/followers","following_url":"https://api.github.com/users/dasilvacontin/following{/other_user}","gists_url":"https://api.github.com/users/dasilvacontin/gists{/gist_id}","starred_url":"https://api.github.com/users/dasilvacontin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dasilvacontin/subscriptions","organizations_url":"https://api.github.com/users/dasilvacontin/orgs","repos_url":"https://api.github.com/users/dasilvacontin/repos","events_url":"https://api.github.com/users/dasilvacontin/events{/privacy}","received_events_url":"https://api.github.com/users/dasilvacontin/received_events","type":"User","site_admin":false},"repo":{"id":15650246,"name":"subclass-error","full_name":"dasilvacontin/subclass-error","owner":{"login":"dasilvacontin","id":1260830,"avatar_url":"https://avatars.githubusercontent.com/u/1260830?v=3","gravatar_id":"","url":"https://api.github.com/users/dasilvacontin","html_url":"https://github.com/dasilvacontin","followers_url":"https://api.github.com/users/dasilvacontin/followers","following_url":"https://api.github.com/users/dasilvacontin/following{/other_user}","gists_url":"https://api.github.com/users/dasilvacontin/gists{/gist_id}","starred_url":"https://api.github.com/users/dasilvacontin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dasilvacontin/subscriptions","organizations_url":"https://api.github.com/users/dasilvacontin/orgs","repos_url":"https://api.github.com/users/dasilvacontin/repos","events_url":"https://api.github.com/users/dasilvacontin/events{/privacy}","received_events_url":"https://api.github.com/users/dasilvacontin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dasilvacontin/subclass-error","description":"Workaround for subclassing errors. Both instanceof and stack are functional.","fork":false,"url":"https://api.github.com/repos/dasilvacontin/subclass-error","forks_url":"https://api.github.com/repos/dasilvacontin/subclass-error/forks","keys_url":"https://api.github.com/repos/dasilvacontin/subclass-error/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dasilvacontin/subclass-error/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dasilvacontin/subclass-error/teams","hooks_url":"https://api.github.com/repos/dasilvacontin/subclass-error/hooks","issue_events_url":"https://api.github.com/repos/dasilvacontin/subclass-error/issues/events{/number}","events_url":"https://api.github.com/repos/dasilvacontin/subclass-error/events","assignees_url":"https://api.github.com/repos/dasilvacontin/subclass-error/assignees{/user}","branches_url":"https://api.github.com/repos/dasilvacontin/subclass-error/branches{/branch}","tags_url":"https://api.github.com/repos/dasilvacontin/subclass-error/tags","blobs_url":"https://api.github.com/repos/dasilvacontin/subclass-error/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dasilvacontin/subclass-error/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dasilvacontin/subclass-error/git/refs{/sha}","trees_url":"https://api.github.com/repos/dasilvacontin/subclass-error/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dasilvacontin/subclass-error/statuses/{sha}","languages_url":"https://api.github.com/repos/dasilvacontin/subclass-error/languages","stargazers_url":"https://api.github.com/repos/dasilvacontin/subclass-error/stargazers","contributors_url":"https://api.github.com/repos/dasilvacontin/subclass-error/contributors","subscribers_url":"https://api.github.com/repos/dasilvacontin/subclass-error/subscribers","subscription_url":"https://api.github.com/repos/dasilvacontin/subclass-error/subscription","commits_url":"https://api.github.com/repos/dasilvacontin/subclass-error/commits{/sha}","git_commits_url":"https://api.github.com/repos/dasilvacontin/subclass-error/git/commits{/sha}","comments_url":"https://api.github.com/repos/dasilvacontin/subclass-error/comments{/number}","issue_comment_url":"https://api.github.com/repos/dasilvacontin/subclass-error/issues/comments{/number}","contents_url":"https://api.github.com/repos/dasilvacontin/subclass-error/contents/{+path}","compare_url":"https://api.github.com/repos/dasilvacontin/subclass-error/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dasilvacontin/subclass-error/merges","archive_url":"https://api.github.com/repos/dasilvacontin/subclass-error/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dasilvacontin/subclass-error/downloads","issues_url":"https://api.github.com/repos/dasilvacontin/subclass-error/issues{/number}","pulls_url":"https://api.github.com/repos/dasilvacontin/subclass-error/pulls{/number}","milestones_url":"https://api.github.com/repos/dasilvacontin/subclass-error/milestones{/number}","notifications_url":"https://api.github.com/repos/dasilvacontin/subclass-error/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dasilvacontin/subclass-error/labels{/name}","releases_url":"https://api.github.com/repos/dasilvacontin/subclass-error/releases{/id}","created_at":"2014-01-05T11:53:29Z","updated_at":"2015-02-03T03:30:16Z","pushed_at":"2014-01-05T13:55:24Z","git_url":"git://github.com/dasilvacontin/subclass-error.git","ssh_url":"git@github.com:dasilvacontin/subclass-error.git","clone_url":"https://github.com/dasilvacontin/subclass-error.git","svn_url":"https://github.com/dasilvacontin/subclass-error","homepage":null,"size":156,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dasilvacontin/subclass-error/pulls/1"},"html":{"href":"https://github.com/dasilvacontin/subclass-error/pull/1"},"issue":{"href":"https://api.github.com/repos/dasilvacontin/subclass-error/issues/1"},"comments":{"href":"https://api.github.com/repos/dasilvacontin/subclass-error/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/dasilvacontin/subclass-error/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/dasilvacontin/subclass-error/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dasilvacontin/subclass-error/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/dasilvacontin/subclass-error/statuses/d86b829f04d788a3d8eaa48896a84c4f38714567"}}}}