{"action":"created","issue":{"url":"https://api.github.com/repos/josdejong/mathjs/issues/554","repository_url":"https://api.github.com/repos/josdejong/mathjs","labels_url":"https://api.github.com/repos/josdejong/mathjs/issues/554/labels{/name}","comments_url":"https://api.github.com/repos/josdejong/mathjs/issues/554/comments","events_url":"https://api.github.com/repos/josdejong/mathjs/issues/554/events","html_url":"https://github.com/josdejong/mathjs/issues/554","id":127881677,"number":554,"title":"Adding custom units into the library","user":{"login":"hgupta9","id":6797866,"avatar_url":"https://avatars.githubusercontent.com/u/6797866?v=3","gravatar_id":"","url":"https://api.github.com/users/hgupta9","html_url":"https://github.com/hgupta9","followers_url":"https://api.github.com/users/hgupta9/followers","following_url":"https://api.github.com/users/hgupta9/following{/other_user}","gists_url":"https://api.github.com/users/hgupta9/gists{/gist_id}","starred_url":"https://api.github.com/users/hgupta9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hgupta9/subscriptions","organizations_url":"https://api.github.com/users/hgupta9/orgs","repos_url":"https://api.github.com/users/hgupta9/repos","events_url":"https://api.github.com/users/hgupta9/events{/privacy}","received_events_url":"https://api.github.com/users/hgupta9/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/josdejong/mathjs/labels/feature","name":"feature","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2016-01-21T09:32:47Z","updated_at":"2016-07-14T02:09:42Z","closed_at":null,"body":"Is there any API for devs to add their own units into the system? I have a few custom units (in a new unit base) that I want to convert via the math.js library but have no idea where to start. Basically I need to add a new base, then a couple of units with that new base, then a couple of aliases for that. An API like this would be cool:\r\n\r\n    // here \"30\" is the base ID, and \"kram\" is the name of the base unit (like gram)\r\n    math.units.registerBase(30, \"kram\")\r\n\r\n    // register 1 krg = 1000 krams\r\n    math.units.registerAlias(\"kram\", 1000, \"krg\")\r\n\r\n    // register 1 \"kound\" is = 453 krams\r\n    math.units.registerUnit(\"kram\", 453.592, [\"kound\", \"kounds\"])\r\n\r\nI could help build such an API if you tell me which arrays/objects the unit / base must be registered in in order to work."},"comment":{"url":"https://api.github.com/repos/josdejong/mathjs/issues/comments/232537992","html_url":"https://github.com/josdejong/mathjs/issues/554#issuecomment-232537992","issue_url":"https://api.github.com/repos/josdejong/mathjs/issues/554","id":232537992,"user":{"login":"ericman314","id":6345617,"avatar_url":"https://avatars.githubusercontent.com/u/6345617?v=3","gravatar_id":"","url":"https://api.github.com/users/ericman314","html_url":"https://github.com/ericman314","followers_url":"https://api.github.com/users/ericman314/followers","following_url":"https://api.github.com/users/ericman314/following{/other_user}","gists_url":"https://api.github.com/users/ericman314/gists{/gist_id}","starred_url":"https://api.github.com/users/ericman314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericman314/subscriptions","organizations_url":"https://api.github.com/users/ericman314/orgs","repos_url":"https://api.github.com/users/ericman314/repos","events_url":"https://api.github.com/users/ericman314/events{/privacy}","received_events_url":"https://api.github.com/users/ericman314/received_events","type":"User","site_admin":false},"created_at":"2016-07-14T02:09:42Z","updated_at":"2016-07-14T02:09:42Z","body":"See PR #683. "}}
{"actor":{"display_login":"ericman314"}}