{"action":"created","issue":{"url":"https://api.github.com/repos/seangarner/mongo-url-utils/issues/11","labels_url":"https://api.github.com/repos/seangarner/mongo-url-utils/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/seangarner/mongo-url-utils/issues/11/comments","events_url":"https://api.github.com/repos/seangarner/mongo-url-utils/issues/11/events","html_url":"https://github.com/seangarner/mongo-url-utils/issues/11","id":124604029,"number":11,"title":"Limit must be an integer Code","user":{"login":"lafama","id":260220,"avatar_url":"https://avatars.githubusercontent.com/u/260220?v=3","gravatar_id":"","url":"https://api.github.com/users/lafama","html_url":"https://github.com/lafama","followers_url":"https://api.github.com/users/lafama/followers","following_url":"https://api.github.com/users/lafama/following{/other_user}","gists_url":"https://api.github.com/users/lafama/gists{/gist_id}","starred_url":"https://api.github.com/users/lafama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lafama/subscriptions","organizations_url":"https://api.github.com/users/lafama/orgs","repos_url":"https://api.github.com/users/lafama/repos","events_url":"https://api.github.com/users/lafama/events{/privacy}","received_events_url":"https://api.github.com/users/lafama/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-01-02T18:26:26Z","updated_at":"2016-01-05T08:47:42Z","closed_at":null,"body":"Am trying to get my head around this code in the limit.js file\r\n```\r\n if (n.toString() !== s){ \r\n  \tthrow new Error('limit must be an integer');}\r\n```\r\nWhy do you have it there?"},"comment":{"url":"https://api.github.com/repos/seangarner/mongo-url-utils/issues/comments/168936222","html_url":"https://github.com/seangarner/mongo-url-utils/issues/11#issuecomment-168936222","issue_url":"https://api.github.com/repos/seangarner/mongo-url-utils/issues/11","id":168936222,"user":{"login":"seangarner","id":1780230,"avatar_url":"https://avatars.githubusercontent.com/u/1780230?v=3","gravatar_id":"","url":"https://api.github.com/users/seangarner","html_url":"https://github.com/seangarner","followers_url":"https://api.github.com/users/seangarner/followers","following_url":"https://api.github.com/users/seangarner/following{/other_user}","gists_url":"https://api.github.com/users/seangarner/gists{/gist_id}","starred_url":"https://api.github.com/users/seangarner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seangarner/subscriptions","organizations_url":"https://api.github.com/users/seangarner/orgs","repos_url":"https://api.github.com/users/seangarner/repos","events_url":"https://api.github.com/users/seangarner/events{/privacy}","received_events_url":"https://api.github.com/users/seangarner/received_events","type":"User","site_admin":false},"created_at":"2016-01-05T08:47:42Z","updated_at":"2016-01-05T08:47:42Z","body":"Have you considered setting defaults on the output instead of the input?\r\n\r\n```js\r\nvar opts = mongoUrlUtils(...);\r\nif (opts.limit === undefined) opts.limit = 100;\r\n``` "}}