{"action":"created","comment":{"url":"https://api.github.com/repos/clemos/haxe-js-kit/pulls/comments/57434316","id":57434316,"diff_hunk":"@@ -0,0 +1,44 @@\n+package js.npm;\n+\n+import haxe.Log;\n+import haxe.PosInfos;\n+import js.Lib;\n+import js.support.Either;\n+\n+typedef DebugFunction = Dynamic -> haxe.extern.Rest<Dynamic> -> Void;\n+typedef DebugHaxeLogTraceFunction = Dynamic -> ?PosInfos -> Void;\n+\n+extern class Debug\n+implements npm.Package.RequireNamespace<\"debug\",\"^2.2.0\">\n+{\n+\tpublic static inline function construct(name : String) : DebugInstance {\n+\t\treturn new DebugInstance(name);\n+\t}\n+\t\n+\tpublic static inline function enable(name : String) : Void {\n+\t\tuntyped Lib.require(\"debug\").enable(name);","path":"js/npm/Debug.hx","position":19,"original_position":19,"commit_id":"1b02fa3a3bc5b7a9959c88d0fda7ae03907e9842","original_commit_id":"1b02fa3a3bc5b7a9959c88d0fda7ae03907e9842","user":{"login":"clemos","id":32961,"avatar_url":"https://avatars.githubusercontent.com/u/32961?v=3","gravatar_id":"","url":"https://api.github.com/users/clemos","html_url":"https://github.com/clemos","followers_url":"https://api.github.com/users/clemos/followers","following_url":"https://api.github.com/users/clemos/following{/other_user}","gists_url":"https://api.github.com/users/clemos/gists{/gist_id}","starred_url":"https://api.github.com/users/clemos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clemos/subscriptions","organizations_url":"https://api.github.com/users/clemos/orgs","repos_url":"https://api.github.com/users/clemos/repos","events_url":"https://api.github.com/users/clemos/events{/privacy}","received_events_url":"https://api.github.com/users/clemos/received_events","type":"User","site_admin":false},"body":"I don't think you need `inline` or this trick, do you ?","created_at":"2016-03-25T10:33:01Z","updated_at":"2016-03-25T10:33:01Z","html_url":"https://github.com/clemos/haxe-js-kit/pull/129#discussion_r57434316","pull_request_url":"https://api.github.com/repos/clemos/haxe-js-kit/pulls/129","_links":{"self":{"href":"https://api.github.com/repos/clemos/haxe-js-kit/pulls/comments/57434316"},"html":{"href":"https://github.com/clemos/haxe-js-kit/pull/129#discussion_r57434316"},"pull_request":{"href":"https://api.github.com/repos/clemos/haxe-js-kit/pulls/129"}}},"pull_request":{"url":"https://api.github.com/repos/clemos/haxe-js-kit/pulls/129","id":61709125,"html_url":"https://github.com/clemos/haxe-js-kit/pull/129","diff_url":"https://github.com/clemos/haxe-js-kit/pull/129.diff","patch_url":"https://github.com/clemos/haxe-js-kit/pull/129.patch","issue_url":"https://api.github.com/repos/clemos/haxe-js-kit/issues/129","number":129,"state":"open","locked":false,"title":"Added Debug and Xray npm packages.","user":{"login":"ciscoheat","id":130450,"avatar_url":"https://avatars.githubusercontent.com/u/130450?v=3","gravatar_id":"","url":"https://api.github.com/users/ciscoheat","html_url":"https://github.com/ciscoheat","followers_url":"https://api.github.com/users/ciscoheat/followers","following_url":"https://api.github.com/users/ciscoheat/following{/other_user}","gists_url":"https://api.github.com/users/ciscoheat/gists{/gist_id}","starred_url":"https://api.github.com/users/ciscoheat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciscoheat/subscriptions","organizations_url":"https://api.github.com/users/ciscoheat/orgs","repos_url":"https://api.github.com/users/ciscoheat/repos","events_url":"https://api.github.com/users/ciscoheat/events{/privacy}","received_events_url":"https://api.github.com/users/ciscoheat/received_events","type":"User","site_admin":false},"body":"Two pretty useful packages. Debug is nice and simple: https://www.npmjs.com/package/debug\r\n\r\n[X-ray](https://www.npmjs.com/package/x-ray) is more advanced, and I had to create a separate version of the request driver it uses, I hope that's ok.\r\n\r\nFinally, since both packages uses a function with properties, I'm using an abstract for the implementation. The `@:callable` metadata makes it possible, with that it's possible to call the underlying function directly. Nice stuff!","created_at":"2016-03-04T13:03:20Z","updated_at":"2016-03-25T10:33:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"43c3ca972072651f6872af11f6cca65e19a991ba","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/clemos/haxe-js-kit/pulls/129/commits","review_comments_url":"https://api.github.com/repos/clemos/haxe-js-kit/pulls/129/comments","review_comment_url":"https://api.github.com/repos/clemos/haxe-js-kit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/clemos/haxe-js-kit/issues/129/comments","statuses_url":"https://api.github.com/repos/clemos/haxe-js-kit/statuses/1b02fa3a3bc5b7a9959c88d0fda7ae03907e9842","head":{"label":"ciscoheat:npm","ref":"npm","sha":"1b02fa3a3bc5b7a9959c88d0fda7ae03907e9842","user":{"login":"ciscoheat","id":130450,"avatar_url":"https://avatars.githubusercontent.com/u/130450?v=3","gravatar_id":"","url":"https://api.github.com/users/ciscoheat","html_url":"https://github.com/ciscoheat","followers_url":"https://api.github.com/users/ciscoheat/followers","following_url":"https://api.github.com/users/ciscoheat/following{/other_user}","gists_url":"https://api.github.com/users/ciscoheat/gists{/gist_id}","starred_url":"https://api.github.com/users/ciscoheat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciscoheat/subscriptions","organizations_url":"https://api.github.com/users/ciscoheat/orgs","repos_url":"https://api.github.com/users/ciscoheat/repos","events_url":"https://api.github.com/users/ciscoheat/events{/privacy}","received_events_url":"https://api.github.com/users/ciscoheat/received_events","type":"User","site_admin":false},"repo":{"id":29233197,"name":"haxe-js-kit","full_name":"ciscoheat/haxe-js-kit","owner":{"login":"ciscoheat","id":130450,"avatar_url":"https://avatars.githubusercontent.com/u/130450?v=3","gravatar_id":"","url":"https://api.github.com/users/ciscoheat","html_url":"https://github.com/ciscoheat","followers_url":"https://api.github.com/users/ciscoheat/followers","following_url":"https://api.github.com/users/ciscoheat/following{/other_user}","gists_url":"https://api.github.com/users/ciscoheat/gists{/gist_id}","starred_url":"https://api.github.com/users/ciscoheat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciscoheat/subscriptions","organizations_url":"https://api.github.com/users/ciscoheat/orgs","repos_url":"https://api.github.com/users/ciscoheat/repos","events_url":"https://api.github.com/users/ciscoheat/events{/privacy}","received_events_url":"https://api.github.com/users/ciscoheat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ciscoheat/haxe-js-kit","description":"Haxe tools and externs for Javascript and Node.js","fork":true,"url":"https://api.github.com/repos/ciscoheat/haxe-js-kit","forks_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/forks","keys_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/teams","hooks_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/hooks","issue_events_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/issues/events{/number}","events_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/events","assignees_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/assignees{/user}","branches_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/branches{/branch}","tags_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/tags","blobs_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/git/refs{/sha}","trees_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/statuses/{sha}","languages_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/languages","stargazers_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/stargazers","contributors_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/contributors","subscribers_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/subscribers","subscription_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/subscription","commits_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/commits{/sha}","git_commits_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/git/commits{/sha}","comments_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/comments{/number}","issue_comment_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/issues/comments{/number}","contents_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/contents/{+path}","compare_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/merges","archive_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/downloads","issues_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/issues{/number}","pulls_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/pulls{/number}","milestones_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/milestones{/number}","notifications_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/labels{/name}","releases_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/releases{/id}","deployments_url":"https://api.github.com/repos/ciscoheat/haxe-js-kit/deployments","created_at":"2015-01-14T07:44:59Z","updated_at":"2015-01-14T13:06:25Z","pushed_at":"2016-03-24T15:26:42Z","git_url":"git://github.com/ciscoheat/haxe-js-kit.git","ssh_url":"git@github.com:ciscoheat/haxe-js-kit.git","clone_url":"https://github.com/ciscoheat/haxe-js-kit.git","svn_url":"https://github.com/ciscoheat/haxe-js-kit","homepage":"","size":522,"stargazers_count":0,"watchers_count":0,"language":"Haxe","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":"clemos:develop","ref":"develop","sha":"bd73548441eb3ab4c2943330a403b0e901fa5ab8","user":{"login":"clemos","id":32961,"avatar_url":"https://avatars.githubusercontent.com/u/32961?v=3","gravatar_id":"","url":"https://api.github.com/users/clemos","html_url":"https://github.com/clemos","followers_url":"https://api.github.com/users/clemos/followers","following_url":"https://api.github.com/users/clemos/following{/other_user}","gists_url":"https://api.github.com/users/clemos/gists{/gist_id}","starred_url":"https://api.github.com/users/clemos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clemos/subscriptions","organizations_url":"https://api.github.com/users/clemos/orgs","repos_url":"https://api.github.com/users/clemos/repos","events_url":"https://api.github.com/users/clemos/events{/privacy}","received_events_url":"https://api.github.com/users/clemos/received_events","type":"User","site_admin":false},"repo":{"id":10140705,"name":"haxe-js-kit","full_name":"clemos/haxe-js-kit","owner":{"login":"clemos","id":32961,"avatar_url":"https://avatars.githubusercontent.com/u/32961?v=3","gravatar_id":"","url":"https://api.github.com/users/clemos","html_url":"https://github.com/clemos","followers_url":"https://api.github.com/users/clemos/followers","following_url":"https://api.github.com/users/clemos/following{/other_user}","gists_url":"https://api.github.com/users/clemos/gists{/gist_id}","starred_url":"https://api.github.com/users/clemos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clemos/subscriptions","organizations_url":"https://api.github.com/users/clemos/orgs","repos_url":"https://api.github.com/users/clemos/repos","events_url":"https://api.github.com/users/clemos/events{/privacy}","received_events_url":"https://api.github.com/users/clemos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/clemos/haxe-js-kit","description":"Haxe tools and externs for Javascript and Node.js","fork":true,"url":"https://api.github.com/repos/clemos/haxe-js-kit","forks_url":"https://api.github.com/repos/clemos/haxe-js-kit/forks","keys_url":"https://api.github.com/repos/clemos/haxe-js-kit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clemos/haxe-js-kit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clemos/haxe-js-kit/teams","hooks_url":"https://api.github.com/repos/clemos/haxe-js-kit/hooks","issue_events_url":"https://api.github.com/repos/clemos/haxe-js-kit/issues/events{/number}","events_url":"https://api.github.com/repos/clemos/haxe-js-kit/events","assignees_url":"https://api.github.com/repos/clemos/haxe-js-kit/assignees{/user}","branches_url":"https://api.github.com/repos/clemos/haxe-js-kit/branches{/branch}","tags_url":"https://api.github.com/repos/clemos/haxe-js-kit/tags","blobs_url":"https://api.github.com/repos/clemos/haxe-js-kit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clemos/haxe-js-kit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clemos/haxe-js-kit/git/refs{/sha}","trees_url":"https://api.github.com/repos/clemos/haxe-js-kit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clemos/haxe-js-kit/statuses/{sha}","languages_url":"https://api.github.com/repos/clemos/haxe-js-kit/languages","stargazers_url":"https://api.github.com/repos/clemos/haxe-js-kit/stargazers","contributors_url":"https://api.github.com/repos/clemos/haxe-js-kit/contributors","subscribers_url":"https://api.github.com/repos/clemos/haxe-js-kit/subscribers","subscription_url":"https://api.github.com/repos/clemos/haxe-js-kit/subscription","commits_url":"https://api.github.com/repos/clemos/haxe-js-kit/commits{/sha}","git_commits_url":"https://api.github.com/repos/clemos/haxe-js-kit/git/commits{/sha}","comments_url":"https://api.github.com/repos/clemos/haxe-js-kit/comments{/number}","issue_comment_url":"https://api.github.com/repos/clemos/haxe-js-kit/issues/comments{/number}","contents_url":"https://api.github.com/repos/clemos/haxe-js-kit/contents/{+path}","compare_url":"https://api.github.com/repos/clemos/haxe-js-kit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clemos/haxe-js-kit/merges","archive_url":"https://api.github.com/repos/clemos/haxe-js-kit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clemos/haxe-js-kit/downloads","issues_url":"https://api.github.com/repos/clemos/haxe-js-kit/issues{/number}","pulls_url":"https://api.github.com/repos/clemos/haxe-js-kit/pulls{/number}","milestones_url":"https://api.github.com/repos/clemos/haxe-js-kit/milestones{/number}","notifications_url":"https://api.github.com/repos/clemos/haxe-js-kit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clemos/haxe-js-kit/labels{/name}","releases_url":"https://api.github.com/repos/clemos/haxe-js-kit/releases{/id}","deployments_url":"https://api.github.com/repos/clemos/haxe-js-kit/deployments","created_at":"2013-05-18T11:59:54Z","updated_at":"2016-03-24T18:59:17Z","pushed_at":"2016-03-24T15:26:43Z","git_url":"git://github.com/clemos/haxe-js-kit.git","ssh_url":"git@github.com:clemos/haxe-js-kit.git","clone_url":"https://github.com/clemos/haxe-js-kit.git","svn_url":"https://github.com/clemos/haxe-js-kit","homepage":"","size":540,"stargazers_count":92,"watchers_count":92,"language":"Haxe","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":8,"forks":27,"open_issues":8,"watchers":92,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/clemos/haxe-js-kit/pulls/129"},"html":{"href":"https://github.com/clemos/haxe-js-kit/pull/129"},"issue":{"href":"https://api.github.com/repos/clemos/haxe-js-kit/issues/129"},"comments":{"href":"https://api.github.com/repos/clemos/haxe-js-kit/issues/129/comments"},"review_comments":{"href":"https://api.github.com/repos/clemos/haxe-js-kit/pulls/129/comments"},"review_comment":{"href":"https://api.github.com/repos/clemos/haxe-js-kit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/clemos/haxe-js-kit/pulls/129/commits"},"statuses":{"href":"https://api.github.com/repos/clemos/haxe-js-kit/statuses/1b02fa3a3bc5b7a9959c88d0fda7ae03907e9842"}}}}