{"action":"created","comment":{"url":"https://api.github.com/repos/chelm/featureservice/pulls/comments/35927822","id":35927822,"diff_hunk":"@@ -8,13 +5,20 @@ var zlib = require('zlib')\n var urlUtils = require('url')\n \n /**\n- * A feature service object needs a url and some optional params to make requests\n- * this module exposes a pageQueue that can take an array of page url\n- * the pageQueue will report back each page of features as they return\n- * @module FeatureService\n+ * Feature Service constructor. Requires a URL.\n+ * Exposes a pageQueue that can take an array of page URLs.\n+ * The pageQueue will report back each page of features as they return.\n  *\n+ * @class\n+ * @param {string} url - address of feature service\n+ * @param {object} options - layer (default: 0)\n  */\n var FeatureService = function (url, options) {\n+  // catch omission of `new` keyword\n+  if (!(this instanceof FeatureService)) {\n+    return new FeatureService(url, options)\n+  }","path":"index.js","position":27,"original_position":27,"commit_id":"63f23723658c537167ca97c58851dc879351ab20","original_commit_id":"63f23723658c537167ca97c58851dc879351ab20","user":{"login":"ngoldman","id":427322,"avatar_url":"https://avatars.githubusercontent.com/u/427322?v=3","gravatar_id":"","url":"https://api.github.com/users/ngoldman","html_url":"https://github.com/ngoldman","followers_url":"https://api.github.com/users/ngoldman/followers","following_url":"https://api.github.com/users/ngoldman/following{/other_user}","gists_url":"https://api.github.com/users/ngoldman/gists{/gist_id}","starred_url":"https://api.github.com/users/ngoldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngoldman/subscriptions","organizations_url":"https://api.github.com/users/ngoldman/orgs","repos_url":"https://api.github.com/users/ngoldman/repos","events_url":"https://api.github.com/users/ngoldman/events{/privacy}","received_events_url":"https://api.github.com/users/ngoldman/received_events","type":"User","site_admin":false},"body":"This will ensure omitting `new` doesn't cause variables leaking into the global `this` object.","created_at":"2015-07-30T22:18:33Z","updated_at":"2015-07-30T22:18:33Z","html_url":"https://github.com/chelm/featureservice/pull/2#discussion_r35927822","pull_request_url":"https://api.github.com/repos/chelm/featureservice/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/chelm/featureservice/pulls/comments/35927822"},"html":{"href":"https://github.com/chelm/featureservice/pull/2#discussion_r35927822"},"pull_request":{"href":"https://api.github.com/repos/chelm/featureservice/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/chelm/featureservice/pulls/2","id":41288609,"html_url":"https://github.com/chelm/featureservice/pull/2","diff_url":"https://github.com/chelm/featureservice/pull/2.diff","patch_url":"https://github.com/chelm/featureservice/pull/2.patch","issue_url":"https://api.github.com/repos/chelm/featureservice/issues/2","number":2,"state":"open","locked":false,"title":"improve constructor pattern & jsdoc","user":{"login":"ngoldman","id":427322,"avatar_url":"https://avatars.githubusercontent.com/u/427322?v=3","gravatar_id":"","url":"https://api.github.com/users/ngoldman","html_url":"https://github.com/ngoldman","followers_url":"https://api.github.com/users/ngoldman/followers","following_url":"https://api.github.com/users/ngoldman/following{/other_user}","gists_url":"https://api.github.com/users/ngoldman/gists{/gist_id}","starred_url":"https://api.github.com/users/ngoldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngoldman/subscriptions","organizations_url":"https://api.github.com/users/ngoldman/orgs","repos_url":"https://api.github.com/users/ngoldman/repos","events_url":"https://api.github.com/users/ngoldman/events{/privacy}","received_events_url":"https://api.github.com/users/ngoldman/received_events","type":"User","site_admin":false},"body":"Just a couple improvements :)","created_at":"2015-07-30T22:17:46Z","updated_at":"2015-07-30T22:18:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b12a14b2a2eb05edcd7e5f54e10a09f05965e953","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chelm/featureservice/pulls/2/commits","review_comments_url":"https://api.github.com/repos/chelm/featureservice/pulls/2/comments","review_comment_url":"https://api.github.com/repos/chelm/featureservice/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chelm/featureservice/issues/2/comments","statuses_url":"https://api.github.com/repos/chelm/featureservice/statuses/63f23723658c537167ca97c58851dc879351ab20","head":{"label":"ngoldman:patterns","ref":"patterns","sha":"63f23723658c537167ca97c58851dc879351ab20","user":{"login":"ngoldman","id":427322,"avatar_url":"https://avatars.githubusercontent.com/u/427322?v=3","gravatar_id":"","url":"https://api.github.com/users/ngoldman","html_url":"https://github.com/ngoldman","followers_url":"https://api.github.com/users/ngoldman/followers","following_url":"https://api.github.com/users/ngoldman/following{/other_user}","gists_url":"https://api.github.com/users/ngoldman/gists{/gist_id}","starred_url":"https://api.github.com/users/ngoldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngoldman/subscriptions","organizations_url":"https://api.github.com/users/ngoldman/orgs","repos_url":"https://api.github.com/users/ngoldman/repos","events_url":"https://api.github.com/users/ngoldman/events{/privacy}","received_events_url":"https://api.github.com/users/ngoldman/received_events","type":"User","site_admin":false},"repo":{"id":39973601,"name":"featureservice","full_name":"ngoldman/featureservice","owner":{"login":"ngoldman","id":427322,"avatar_url":"https://avatars.githubusercontent.com/u/427322?v=3","gravatar_id":"","url":"https://api.github.com/users/ngoldman","html_url":"https://github.com/ngoldman","followers_url":"https://api.github.com/users/ngoldman/followers","following_url":"https://api.github.com/users/ngoldman/following{/other_user}","gists_url":"https://api.github.com/users/ngoldman/gists{/gist_id}","starred_url":"https://api.github.com/users/ngoldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngoldman/subscriptions","organizations_url":"https://api.github.com/users/ngoldman/orgs","repos_url":"https://api.github.com/users/ngoldman/repos","events_url":"https://api.github.com/users/ngoldman/events{/privacy}","received_events_url":"https://api.github.com/users/ngoldman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ngoldman/featureservice","description":"a node module for talking to Esri featureservices, nothing fancy here, just every feature from a service","fork":true,"url":"https://api.github.com/repos/ngoldman/featureservice","forks_url":"https://api.github.com/repos/ngoldman/featureservice/forks","keys_url":"https://api.github.com/repos/ngoldman/featureservice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ngoldman/featureservice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ngoldman/featureservice/teams","hooks_url":"https://api.github.com/repos/ngoldman/featureservice/hooks","issue_events_url":"https://api.github.com/repos/ngoldman/featureservice/issues/events{/number}","events_url":"https://api.github.com/repos/ngoldman/featureservice/events","assignees_url":"https://api.github.com/repos/ngoldman/featureservice/assignees{/user}","branches_url":"https://api.github.com/repos/ngoldman/featureservice/branches{/branch}","tags_url":"https://api.github.com/repos/ngoldman/featureservice/tags","blobs_url":"https://api.github.com/repos/ngoldman/featureservice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ngoldman/featureservice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ngoldman/featureservice/git/refs{/sha}","trees_url":"https://api.github.com/repos/ngoldman/featureservice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ngoldman/featureservice/statuses/{sha}","languages_url":"https://api.github.com/repos/ngoldman/featureservice/languages","stargazers_url":"https://api.github.com/repos/ngoldman/featureservice/stargazers","contributors_url":"https://api.github.com/repos/ngoldman/featureservice/contributors","subscribers_url":"https://api.github.com/repos/ngoldman/featureservice/subscribers","subscription_url":"https://api.github.com/repos/ngoldman/featureservice/subscription","commits_url":"https://api.github.com/repos/ngoldman/featureservice/commits{/sha}","git_commits_url":"https://api.github.com/repos/ngoldman/featureservice/git/commits{/sha}","comments_url":"https://api.github.com/repos/ngoldman/featureservice/comments{/number}","issue_comment_url":"https://api.github.com/repos/ngoldman/featureservice/issues/comments{/number}","contents_url":"https://api.github.com/repos/ngoldman/featureservice/contents/{+path}","compare_url":"https://api.github.com/repos/ngoldman/featureservice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ngoldman/featureservice/merges","archive_url":"https://api.github.com/repos/ngoldman/featureservice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ngoldman/featureservice/downloads","issues_url":"https://api.github.com/repos/ngoldman/featureservice/issues{/number}","pulls_url":"https://api.github.com/repos/ngoldman/featureservice/pulls{/number}","milestones_url":"https://api.github.com/repos/ngoldman/featureservice/milestones{/number}","notifications_url":"https://api.github.com/repos/ngoldman/featureservice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ngoldman/featureservice/labels{/name}","releases_url":"https://api.github.com/repos/ngoldman/featureservice/releases{/id}","created_at":"2015-07-30T21:37:35Z","updated_at":"2015-07-30T21:37:38Z","pushed_at":"2015-07-30T22:16:53Z","git_url":"git://github.com/ngoldman/featureservice.git","ssh_url":"git@github.com:ngoldman/featureservice.git","clone_url":"https://github.com/ngoldman/featureservice.git","svn_url":"https://github.com/ngoldman/featureservice","homepage":"","size":180,"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":"chelm:master","ref":"master","sha":"b87f77dc64ff7b7449f90b4afcaa83325b0d8b69","user":{"login":"chelm","id":351164,"avatar_url":"https://avatars.githubusercontent.com/u/351164?v=3","gravatar_id":"","url":"https://api.github.com/users/chelm","html_url":"https://github.com/chelm","followers_url":"https://api.github.com/users/chelm/followers","following_url":"https://api.github.com/users/chelm/following{/other_user}","gists_url":"https://api.github.com/users/chelm/gists{/gist_id}","starred_url":"https://api.github.com/users/chelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chelm/subscriptions","organizations_url":"https://api.github.com/users/chelm/orgs","repos_url":"https://api.github.com/users/chelm/repos","events_url":"https://api.github.com/users/chelm/events{/privacy}","received_events_url":"https://api.github.com/users/chelm/received_events","type":"User","site_admin":false},"repo":{"id":39579108,"name":"featureservice","full_name":"chelm/featureservice","owner":{"login":"chelm","id":351164,"avatar_url":"https://avatars.githubusercontent.com/u/351164?v=3","gravatar_id":"","url":"https://api.github.com/users/chelm","html_url":"https://github.com/chelm","followers_url":"https://api.github.com/users/chelm/followers","following_url":"https://api.github.com/users/chelm/following{/other_user}","gists_url":"https://api.github.com/users/chelm/gists{/gist_id}","starred_url":"https://api.github.com/users/chelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chelm/subscriptions","organizations_url":"https://api.github.com/users/chelm/orgs","repos_url":"https://api.github.com/users/chelm/repos","events_url":"https://api.github.com/users/chelm/events{/privacy}","received_events_url":"https://api.github.com/users/chelm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chelm/featureservice","description":"a node module for talking to Esri featureservices, nothing fancy here, just every feature from a service","fork":false,"url":"https://api.github.com/repos/chelm/featureservice","forks_url":"https://api.github.com/repos/chelm/featureservice/forks","keys_url":"https://api.github.com/repos/chelm/featureservice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chelm/featureservice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chelm/featureservice/teams","hooks_url":"https://api.github.com/repos/chelm/featureservice/hooks","issue_events_url":"https://api.github.com/repos/chelm/featureservice/issues/events{/number}","events_url":"https://api.github.com/repos/chelm/featureservice/events","assignees_url":"https://api.github.com/repos/chelm/featureservice/assignees{/user}","branches_url":"https://api.github.com/repos/chelm/featureservice/branches{/branch}","tags_url":"https://api.github.com/repos/chelm/featureservice/tags","blobs_url":"https://api.github.com/repos/chelm/featureservice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chelm/featureservice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chelm/featureservice/git/refs{/sha}","trees_url":"https://api.github.com/repos/chelm/featureservice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chelm/featureservice/statuses/{sha}","languages_url":"https://api.github.com/repos/chelm/featureservice/languages","stargazers_url":"https://api.github.com/repos/chelm/featureservice/stargazers","contributors_url":"https://api.github.com/repos/chelm/featureservice/contributors","subscribers_url":"https://api.github.com/repos/chelm/featureservice/subscribers","subscription_url":"https://api.github.com/repos/chelm/featureservice/subscription","commits_url":"https://api.github.com/repos/chelm/featureservice/commits{/sha}","git_commits_url":"https://api.github.com/repos/chelm/featureservice/git/commits{/sha}","comments_url":"https://api.github.com/repos/chelm/featureservice/comments{/number}","issue_comment_url":"https://api.github.com/repos/chelm/featureservice/issues/comments{/number}","contents_url":"https://api.github.com/repos/chelm/featureservice/contents/{+path}","compare_url":"https://api.github.com/repos/chelm/featureservice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chelm/featureservice/merges","archive_url":"https://api.github.com/repos/chelm/featureservice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chelm/featureservice/downloads","issues_url":"https://api.github.com/repos/chelm/featureservice/issues{/number}","pulls_url":"https://api.github.com/repos/chelm/featureservice/pulls{/number}","milestones_url":"https://api.github.com/repos/chelm/featureservice/milestones{/number}","notifications_url":"https://api.github.com/repos/chelm/featureservice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chelm/featureservice/labels{/name}","releases_url":"https://api.github.com/repos/chelm/featureservice/releases{/id}","created_at":"2015-07-23T16:41:50Z","updated_at":"2015-07-30T21:26:58Z","pushed_at":"2015-07-30T22:17:46Z","git_url":"git://github.com/chelm/featureservice.git","ssh_url":"git@github.com:chelm/featureservice.git","clone_url":"https://github.com/chelm/featureservice.git","svn_url":"https://github.com/chelm/featureservice","homepage":"","size":180,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","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/chelm/featureservice/pulls/2"},"html":{"href":"https://github.com/chelm/featureservice/pull/2"},"issue":{"href":"https://api.github.com/repos/chelm/featureservice/issues/2"},"comments":{"href":"https://api.github.com/repos/chelm/featureservice/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/chelm/featureservice/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/chelm/featureservice/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chelm/featureservice/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/chelm/featureservice/statuses/63f23723658c537167ca97c58851dc879351ab20"}}}}