{"action":"created","comment":{"url":"https://api.github.com/repos/tjmehta/keypather/pulls/comments/25244793","id":25244793,"diff_hunk":"@@ -1,10 +1,8 @@\n-var keypather = module.exports = function (opts) {\n-  var keypather = new Keypather(opts && opts.force);\n-  return keypather;\n-};\n+module.exports = Keypather;\n \n-function Keypather (force) {\n-  this.force = (force !== undefined) ? Boolean(force) : true; // force - default: true\n+function Keypather (opts) {\n+  if (!(this instanceof Keypather)) { return new Keypather(opts); }// Auto instantiate\n+  this.force = (opts && opts.force && Boolean(opts.force) === false ? false : true); // force - default: true","path":"index.js","position":11,"original_position":11,"commit_id":"3bae2565b366f51fdc0cbf42f4e61d1a664e7144","original_commit_id":"3bae2565b366f51fdc0cbf42f4e61d1a664e7144","user":{"login":"stoeffel","id":1217681,"avatar_url":"https://avatars.githubusercontent.com/u/1217681?v=3","gravatar_id":"","url":"https://api.github.com/users/stoeffel","html_url":"https://github.com/stoeffel","followers_url":"https://api.github.com/users/stoeffel/followers","following_url":"https://api.github.com/users/stoeffel/following{/other_user}","gists_url":"https://api.github.com/users/stoeffel/gists{/gist_id}","starred_url":"https://api.github.com/users/stoeffel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoeffel/subscriptions","organizations_url":"https://api.github.com/users/stoeffel/orgs","repos_url":"https://api.github.com/users/stoeffel/repos","events_url":"https://api.github.com/users/stoeffel/events{/privacy}","received_events_url":"https://api.github.com/users/stoeffel/received_events","type":"User","site_admin":false},"body":"This should be:\r\n`this.force = (opts && typeof opts.force !== 'undefined' && Boolean(opts.force) === false ? false : true);`\r\nelse it's always true.\r\n","created_at":"2015-02-24T11:15:00Z","updated_at":"2015-02-24T11:15:00Z","html_url":"https://github.com/tjmehta/keypather/pull/10#discussion_r25244793","pull_request_url":"https://api.github.com/repos/tjmehta/keypather/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/tjmehta/keypather/pulls/comments/25244793"},"html":{"href":"https://github.com/tjmehta/keypather/pull/10#discussion_r25244793"},"pull_request":{"href":"https://api.github.com/repos/tjmehta/keypather/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/tjmehta/keypather/pulls/10","id":29886064,"html_url":"https://github.com/tjmehta/keypather/pull/10","diff_url":"https://github.com/tjmehta/keypather/pull/10.diff","patch_url":"https://github.com/tjmehta/keypather/pull/10.patch","issue_url":"https://api.github.com/repos/tjmehta/keypather/issues/10","number":10,"state":"open","locked":false,"title":"Make the Keypather class auto-instance.","user":{"login":"justsml","id":397632,"avatar_url":"https://avatars.githubusercontent.com/u/397632?v=3","gravatar_id":"","url":"https://api.github.com/users/justsml","html_url":"https://github.com/justsml","followers_url":"https://api.github.com/users/justsml/followers","following_url":"https://api.github.com/users/justsml/following{/other_user}","gists_url":"https://api.github.com/users/justsml/gists{/gist_id}","starred_url":"https://api.github.com/users/justsml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justsml/subscriptions","organizations_url":"https://api.github.com/users/justsml/orgs","repos_url":"https://api.github.com/users/justsml/repos","events_url":"https://api.github.com/users/justsml/events{/privacy}","received_events_url":"https://api.github.com/users/justsml/received_events","type":"User","site_admin":false},"body":"Hey @tjmehta I love your code's approach & scope of feature support... Anyway I will create a separate  issue to discuss some of my thoughts. Anyway, here's a patch to eliminate the need for double parenthesis:\r\nSee my updates to the README.md\r\n\r\n","created_at":"2015-02-24T10:33:32Z","updated_at":"2015-02-24T11:15:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b2da39daea87ebec5acf4a6821dc72dc66eb32f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tjmehta/keypather/pulls/10/commits","review_comments_url":"https://api.github.com/repos/tjmehta/keypather/pulls/10/comments","review_comment_url":"https://api.github.com/repos/tjmehta/keypather/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tjmehta/keypather/issues/10/comments","statuses_url":"https://api.github.com/repos/tjmehta/keypather/statuses/3bae2565b366f51fdc0cbf42f4e61d1a664e7144","head":{"label":"justsml:bug/auto_instance","ref":"bug/auto_instance","sha":"3bae2565b366f51fdc0cbf42f4e61d1a664e7144","user":{"login":"justsml","id":397632,"avatar_url":"https://avatars.githubusercontent.com/u/397632?v=3","gravatar_id":"","url":"https://api.github.com/users/justsml","html_url":"https://github.com/justsml","followers_url":"https://api.github.com/users/justsml/followers","following_url":"https://api.github.com/users/justsml/following{/other_user}","gists_url":"https://api.github.com/users/justsml/gists{/gist_id}","starred_url":"https://api.github.com/users/justsml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justsml/subscriptions","organizations_url":"https://api.github.com/users/justsml/orgs","repos_url":"https://api.github.com/users/justsml/repos","events_url":"https://api.github.com/users/justsml/events{/privacy}","received_events_url":"https://api.github.com/users/justsml/received_events","type":"User","site_admin":false},"repo":{"id":30856044,"name":"keypather","full_name":"justsml/keypather","owner":{"login":"justsml","id":397632,"avatar_url":"https://avatars.githubusercontent.com/u/397632?v=3","gravatar_id":"","url":"https://api.github.com/users/justsml","html_url":"https://github.com/justsml","followers_url":"https://api.github.com/users/justsml/followers","following_url":"https://api.github.com/users/justsml/following{/other_user}","gists_url":"https://api.github.com/users/justsml/gists{/gist_id}","starred_url":"https://api.github.com/users/justsml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justsml/subscriptions","organizations_url":"https://api.github.com/users/justsml/orgs","repos_url":"https://api.github.com/users/justsml/repos","events_url":"https://api.github.com/users/justsml/events{/privacy}","received_events_url":"https://api.github.com/users/justsml/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/justsml/keypather","description":"Get or Set a value from an object using a key path string. Supports bracket notation, dot notation, and functions.","fork":true,"url":"https://api.github.com/repos/justsml/keypather","forks_url":"https://api.github.com/repos/justsml/keypather/forks","keys_url":"https://api.github.com/repos/justsml/keypather/keys{/key_id}","collaborators_url":"https://api.github.com/repos/justsml/keypather/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/justsml/keypather/teams","hooks_url":"https://api.github.com/repos/justsml/keypather/hooks","issue_events_url":"https://api.github.com/repos/justsml/keypather/issues/events{/number}","events_url":"https://api.github.com/repos/justsml/keypather/events","assignees_url":"https://api.github.com/repos/justsml/keypather/assignees{/user}","branches_url":"https://api.github.com/repos/justsml/keypather/branches{/branch}","tags_url":"https://api.github.com/repos/justsml/keypather/tags","blobs_url":"https://api.github.com/repos/justsml/keypather/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/justsml/keypather/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/justsml/keypather/git/refs{/sha}","trees_url":"https://api.github.com/repos/justsml/keypather/git/trees{/sha}","statuses_url":"https://api.github.com/repos/justsml/keypather/statuses/{sha}","languages_url":"https://api.github.com/repos/justsml/keypather/languages","stargazers_url":"https://api.github.com/repos/justsml/keypather/stargazers","contributors_url":"https://api.github.com/repos/justsml/keypather/contributors","subscribers_url":"https://api.github.com/repos/justsml/keypather/subscribers","subscription_url":"https://api.github.com/repos/justsml/keypather/subscription","commits_url":"https://api.github.com/repos/justsml/keypather/commits{/sha}","git_commits_url":"https://api.github.com/repos/justsml/keypather/git/commits{/sha}","comments_url":"https://api.github.com/repos/justsml/keypather/comments{/number}","issue_comment_url":"https://api.github.com/repos/justsml/keypather/issues/comments{/number}","contents_url":"https://api.github.com/repos/justsml/keypather/contents/{+path}","compare_url":"https://api.github.com/repos/justsml/keypather/compare/{base}...{head}","merges_url":"https://api.github.com/repos/justsml/keypather/merges","archive_url":"https://api.github.com/repos/justsml/keypather/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/justsml/keypather/downloads","issues_url":"https://api.github.com/repos/justsml/keypather/issues{/number}","pulls_url":"https://api.github.com/repos/justsml/keypather/pulls{/number}","milestones_url":"https://api.github.com/repos/justsml/keypather/milestones{/number}","notifications_url":"https://api.github.com/repos/justsml/keypather/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/justsml/keypather/labels{/name}","releases_url":"https://api.github.com/repos/justsml/keypather/releases{/id}","created_at":"2015-02-16T06:04:32Z","updated_at":"2015-02-17T02:28:44Z","pushed_at":"2015-02-24T10:30:28Z","git_url":"git://github.com/justsml/keypather.git","ssh_url":"git@github.com:justsml/keypather.git","clone_url":"https://github.com/justsml/keypather.git","svn_url":"https://github.com/justsml/keypather","homepage":"","size":126,"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":"tjmehta:master","ref":"master","sha":"25e55b42b0abcb88524b7e263baf6c69584cc7b0","user":{"login":"tjmehta","id":640279,"avatar_url":"https://avatars.githubusercontent.com/u/640279?v=3","gravatar_id":"","url":"https://api.github.com/users/tjmehta","html_url":"https://github.com/tjmehta","followers_url":"https://api.github.com/users/tjmehta/followers","following_url":"https://api.github.com/users/tjmehta/following{/other_user}","gists_url":"https://api.github.com/users/tjmehta/gists{/gist_id}","starred_url":"https://api.github.com/users/tjmehta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjmehta/subscriptions","organizations_url":"https://api.github.com/users/tjmehta/orgs","repos_url":"https://api.github.com/users/tjmehta/repos","events_url":"https://api.github.com/users/tjmehta/events{/privacy}","received_events_url":"https://api.github.com/users/tjmehta/received_events","type":"User","site_admin":false},"repo":{"id":17122204,"name":"keypather","full_name":"tjmehta/keypather","owner":{"login":"tjmehta","id":640279,"avatar_url":"https://avatars.githubusercontent.com/u/640279?v=3","gravatar_id":"","url":"https://api.github.com/users/tjmehta","html_url":"https://github.com/tjmehta","followers_url":"https://api.github.com/users/tjmehta/followers","following_url":"https://api.github.com/users/tjmehta/following{/other_user}","gists_url":"https://api.github.com/users/tjmehta/gists{/gist_id}","starred_url":"https://api.github.com/users/tjmehta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjmehta/subscriptions","organizations_url":"https://api.github.com/users/tjmehta/orgs","repos_url":"https://api.github.com/users/tjmehta/repos","events_url":"https://api.github.com/users/tjmehta/events{/privacy}","received_events_url":"https://api.github.com/users/tjmehta/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tjmehta/keypather","description":"Get or Set a value from an object using a key path string. Supports bracket notation, dot notation, and functions.","fork":false,"url":"https://api.github.com/repos/tjmehta/keypather","forks_url":"https://api.github.com/repos/tjmehta/keypather/forks","keys_url":"https://api.github.com/repos/tjmehta/keypather/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tjmehta/keypather/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tjmehta/keypather/teams","hooks_url":"https://api.github.com/repos/tjmehta/keypather/hooks","issue_events_url":"https://api.github.com/repos/tjmehta/keypather/issues/events{/number}","events_url":"https://api.github.com/repos/tjmehta/keypather/events","assignees_url":"https://api.github.com/repos/tjmehta/keypather/assignees{/user}","branches_url":"https://api.github.com/repos/tjmehta/keypather/branches{/branch}","tags_url":"https://api.github.com/repos/tjmehta/keypather/tags","blobs_url":"https://api.github.com/repos/tjmehta/keypather/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tjmehta/keypather/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tjmehta/keypather/git/refs{/sha}","trees_url":"https://api.github.com/repos/tjmehta/keypather/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tjmehta/keypather/statuses/{sha}","languages_url":"https://api.github.com/repos/tjmehta/keypather/languages","stargazers_url":"https://api.github.com/repos/tjmehta/keypather/stargazers","contributors_url":"https://api.github.com/repos/tjmehta/keypather/contributors","subscribers_url":"https://api.github.com/repos/tjmehta/keypather/subscribers","subscription_url":"https://api.github.com/repos/tjmehta/keypather/subscription","commits_url":"https://api.github.com/repos/tjmehta/keypather/commits{/sha}","git_commits_url":"https://api.github.com/repos/tjmehta/keypather/git/commits{/sha}","comments_url":"https://api.github.com/repos/tjmehta/keypather/comments{/number}","issue_comment_url":"https://api.github.com/repos/tjmehta/keypather/issues/comments{/number}","contents_url":"https://api.github.com/repos/tjmehta/keypather/contents/{+path}","compare_url":"https://api.github.com/repos/tjmehta/keypather/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tjmehta/keypather/merges","archive_url":"https://api.github.com/repos/tjmehta/keypather/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tjmehta/keypather/downloads","issues_url":"https://api.github.com/repos/tjmehta/keypather/issues{/number}","pulls_url":"https://api.github.com/repos/tjmehta/keypather/pulls{/number}","milestones_url":"https://api.github.com/repos/tjmehta/keypather/milestones{/number}","notifications_url":"https://api.github.com/repos/tjmehta/keypather/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tjmehta/keypather/labels{/name}","releases_url":"https://api.github.com/repos/tjmehta/keypather/releases{/id}","created_at":"2014-02-24T01:51:21Z","updated_at":"2015-02-24T10:57:41Z","pushed_at":"2015-01-08T07:06:01Z","git_url":"git://github.com/tjmehta/keypather.git","ssh_url":"git@github.com:tjmehta/keypather.git","clone_url":"https://github.com/tjmehta/keypather.git","svn_url":"https://github.com/tjmehta/keypather","homepage":"","size":449,"stargazers_count":16,"watchers_count":16,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":6,"forks":5,"open_issues":6,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tjmehta/keypather/pulls/10"},"html":{"href":"https://github.com/tjmehta/keypather/pull/10"},"issue":{"href":"https://api.github.com/repos/tjmehta/keypather/issues/10"},"comments":{"href":"https://api.github.com/repos/tjmehta/keypather/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/tjmehta/keypather/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/tjmehta/keypather/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tjmehta/keypather/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/tjmehta/keypather/statuses/3bae2565b366f51fdc0cbf42f4e61d1a664e7144"}}}}