{"action":"created","issue":{"url":"https://api.github.com/repos/josdejong/mathjs/issues/745","repository_url":"https://api.github.com/repos/josdejong/mathjs","labels_url":"https://api.github.com/repos/josdejong/mathjs/issues/745/labels{/name}","comments_url":"https://api.github.com/repos/josdejong/mathjs/issues/745/comments","events_url":"https://api.github.com/repos/josdejong/mathjs/issues/745/events","html_url":"https://github.com/josdejong/mathjs/issues/745","id":188339632,"number":745,"title":"expression node cloning isn't a deep copy","user":{"login":"evykassirer","id":5634097,"avatar_url":"https://avatars.githubusercontent.com/u/5634097?v=3","gravatar_id":"","url":"https://api.github.com/users/evykassirer","html_url":"https://github.com/evykassirer","followers_url":"https://api.github.com/users/evykassirer/followers","following_url":"https://api.github.com/users/evykassirer/following{/other_user}","gists_url":"https://api.github.com/users/evykassirer/gists{/gist_id}","starred_url":"https://api.github.com/users/evykassirer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evykassirer/subscriptions","organizations_url":"https://api.github.com/users/evykassirer/orgs","repos_url":"https://api.github.com/users/evykassirer/repos","events_url":"https://api.github.com/users/evykassirer/events{/privacy}","received_events_url":"https://api.github.com/users/evykassirer/received_events","type":"User","site_admin":false},"labels":[{"id":28569306,"url":"https://api.github.com/repos/josdejong/mathjs/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-11-09T20:04:54Z","updated_at":"2016-11-18T14:41:16Z","closed_at":null,"body":"```\r\nx = math.parse('2+2+3');\r\ny = x.clone()\r\n```\r\n\r\ncase 1:\r\n```\r\nx.args[1] = math.parse('555')\r\nx.toString()\r\n> \"2 + 2 + 555\"\r\ny.toString()\r\n> \"2 + 2 + 3\"\r\n```\r\n\r\ncase 2:\r\n```\r\nx.args[0].args[0] = math.parse('56')\r\nx.toString()\r\n> \"56 + 2 + 3\"\r\ny.toString()\r\n> \"56 + 2 + 3\"\r\n```\r\n\r\nclone() is supposed to recursively copy (deep copy), right?\r\n\r\nso this seems like a bug 😞 "},"comment":{"url":"https://api.github.com/repos/josdejong/mathjs/issues/comments/261547371","html_url":"https://github.com/josdejong/mathjs/issues/745#issuecomment-261547371","issue_url":"https://api.github.com/repos/josdejong/mathjs/issues/745","id":261547371,"user":{"login":"josdejong","id":568626,"avatar_url":"https://avatars.githubusercontent.com/u/568626?v=3","gravatar_id":"","url":"https://api.github.com/users/josdejong","html_url":"https://github.com/josdejong","followers_url":"https://api.github.com/users/josdejong/followers","following_url":"https://api.github.com/users/josdejong/following{/other_user}","gists_url":"https://api.github.com/users/josdejong/gists{/gist_id}","starred_url":"https://api.github.com/users/josdejong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josdejong/subscriptions","organizations_url":"https://api.github.com/users/josdejong/orgs","repos_url":"https://api.github.com/users/josdejong/repos","events_url":"https://api.github.com/users/josdejong/events{/privacy}","received_events_url":"https://api.github.com/users/josdejong/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T14:41:16Z","updated_at":"2016-11-18T14:41:16Z","body":"I've implemented a new method `Node.cloneDeep`. \r\n\r\nSo now we have a `Node.clone()` (shallow) and `Node.cloneDeep()` (deep), similar to libraries like lodash. \r\n\r\nWill do a release tonight."}}
{"actor":{"display_login":"josdejong"}}