{"action":"created","issue":{"url":"https://api.github.com/repos/pvorb/node-clone/issues/39","labels_url":"https://api.github.com/repos/pvorb/node-clone/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/pvorb/node-clone/issues/39/comments","events_url":"https://api.github.com/repos/pvorb/node-clone/issues/39/events","html_url":"https://github.com/pvorb/node-clone/issues/39","id":54150524,"number":39,"title":"Use predicate when cloning","user":{"login":"guyellis","id":2047725,"avatar_url":"https://avatars.githubusercontent.com/u/2047725?v=3","gravatar_id":"","url":"https://api.github.com/users/guyellis","html_url":"https://github.com/guyellis","followers_url":"https://api.github.com/users/guyellis/followers","following_url":"https://api.github.com/users/guyellis/following{/other_user}","gists_url":"https://api.github.com/users/guyellis/gists{/gist_id}","starred_url":"https://api.github.com/users/guyellis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guyellis/subscriptions","organizations_url":"https://api.github.com/users/guyellis/orgs","repos_url":"https://api.github.com/users/guyellis/repos","events_url":"https://api.github.com/users/guyellis/events{/privacy}","received_events_url":"https://api.github.com/users/guyellis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-13T04:47:43Z","updated_at":"2015-01-14T09:34:31Z","closed_at":null,"body":"I've just been looking at the code for clone and trying to work out if I can use the 4th param (prototype) to provide a predicate to determine if a property/array element should be cloned. I don't think that it can.\r\n\r\nI'm looking to clone an object and to provide that clone function with a predicate that will continue the recursion and copying of properties if the predicate returns true against that object.\r\n\r\nFor example, let's say I have an object that I want to clone but don't want to clone any properties that have values of null or undefined."},"comment":{"url":"https://api.github.com/repos/pvorb/node-clone/issues/comments/69890516","html_url":"https://github.com/pvorb/node-clone/issues/39#issuecomment-69890516","issue_url":"https://api.github.com/repos/pvorb/node-clone/issues/39","id":69890516,"user":{"login":"pvorb","id":183534,"avatar_url":"https://avatars.githubusercontent.com/u/183534?v=3","gravatar_id":"","url":"https://api.github.com/users/pvorb","html_url":"https://github.com/pvorb","followers_url":"https://api.github.com/users/pvorb/followers","following_url":"https://api.github.com/users/pvorb/following{/other_user}","gists_url":"https://api.github.com/users/pvorb/gists{/gist_id}","starred_url":"https://api.github.com/users/pvorb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvorb/subscriptions","organizations_url":"https://api.github.com/users/pvorb/orgs","repos_url":"https://api.github.com/users/pvorb/repos","events_url":"https://api.github.com/users/pvorb/events{/privacy}","received_events_url":"https://api.github.com/users/pvorb/received_events","type":"User","site_admin":false},"created_at":"2015-01-14T09:34:31Z","updated_at":"2015-01-14T09:34:31Z","body":"Using a configuration object sounds like a nice idea, but I would need to introduce it as version 0.3.0, since it would become incompatible to 0.2.x. The 0.2.x branch just has been introduced. Probably v1.0.0 would be even better.\r\n\r\nOn the other hand, I could create a compatible version of the current 0.2.x branch by looking at the parameter in more detail.\r\n\r\nWhat do you think?"}}