{"action":"created","issue":{"url":"https://api.github.com/repos/lodash/lodash/issues/1738","labels_url":"https://api.github.com/repos/lodash/lodash/issues/1738/labels{/name}","comments_url":"https://api.github.com/repos/lodash/lodash/issues/1738/comments","events_url":"https://api.github.com/repos/lodash/lodash/issues/1738/events","html_url":"https://github.com/lodash/lodash/issues/1738","id":125771832,"number":1738,"title":"Feature request: function to coerce strings to other primitive types","user":{"login":"nfcampos","id":56902,"avatar_url":"https://avatars.githubusercontent.com/u/56902?v=3","gravatar_id":"","url":"https://api.github.com/users/nfcampos","html_url":"https://github.com/nfcampos","followers_url":"https://api.github.com/users/nfcampos/followers","following_url":"https://api.github.com/users/nfcampos/following{/other_user}","gists_url":"https://api.github.com/users/nfcampos/gists{/gist_id}","starred_url":"https://api.github.com/users/nfcampos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfcampos/subscriptions","organizations_url":"https://api.github.com/users/nfcampos/orgs","repos_url":"https://api.github.com/users/nfcampos/repos","events_url":"https://api.github.com/users/nfcampos/events{/privacy}","received_events_url":"https://api.github.com/users/nfcampos/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lodash/lodash/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/lodash/lodash/labels/wontfix","name":"wontfix","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-09T17:51:58Z","updated_at":"2016-01-09T19:08:41Z","closed_at":"2016-01-09T19:00:17Z","body":"Hi,\r\n\r\nIs there a method in lodash to convert strings to number/boolean?\r\nsomething like this:\r\n```\r\nfunction parse(val) {\r\n  if (val === 'true') return true\r\n  if (val === 'false') return false\r\n  if (! Number.isNaN(+val)) return +val\r\n  else return val\r\n}\r\n```\r\nDo you think it makes sense to add something like this?\r\n(use case is eg. parsing cookie values, parsing input values)"},"comment":{"url":"https://api.github.com/repos/lodash/lodash/issues/comments/170270957","html_url":"https://github.com/lodash/lodash/issues/1738#issuecomment-170270957","issue_url":"https://api.github.com/repos/lodash/lodash/issues/1738","id":170270957,"user":{"login":"jdalton","id":4303,"avatar_url":"https://avatars.githubusercontent.com/u/4303?v=3","gravatar_id":"","url":"https://api.github.com/users/jdalton","html_url":"https://github.com/jdalton","followers_url":"https://api.github.com/users/jdalton/followers","following_url":"https://api.github.com/users/jdalton/following{/other_user}","gists_url":"https://api.github.com/users/jdalton/gists{/gist_id}","starred_url":"https://api.github.com/users/jdalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdalton/subscriptions","organizations_url":"https://api.github.com/users/jdalton/orgs","repos_url":"https://api.github.com/users/jdalton/repos","events_url":"https://api.github.com/users/jdalton/events{/privacy}","received_events_url":"https://api.github.com/users/jdalton/received_events","type":"User","site_admin":false},"created_at":"2016-01-09T19:08:41Z","updated_at":"2016-01-09T19:08:41Z","body":"Then some mix of the two. This kind of addition is better suited as a `mixin`."}}