{"action":"created","issue":{"url":"https://api.github.com/repos/tuvistavie/js-easy-params/issues/1","labels_url":"https://api.github.com/repos/tuvistavie/js-easy-params/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/tuvistavie/js-easy-params/issues/1/comments","events_url":"https://api.github.com/repos/tuvistavie/js-easy-params/issues/1/events","html_url":"https://github.com/tuvistavie/js-easy-params/issues/1","id":68492428,"number":1,"title":"Default values are being shared across calls of decorated function","user":{"login":"pedroassis","id":4248124,"avatar_url":"https://avatars.githubusercontent.com/u/4248124?v=3","gravatar_id":"","url":"https://api.github.com/users/pedroassis","html_url":"https://github.com/pedroassis","followers_url":"https://api.github.com/users/pedroassis/followers","following_url":"https://api.github.com/users/pedroassis/following{/other_user}","gists_url":"https://api.github.com/users/pedroassis/gists{/gist_id}","starred_url":"https://api.github.com/users/pedroassis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedroassis/subscriptions","organizations_url":"https://api.github.com/users/pedroassis/orgs","repos_url":"https://api.github.com/users/pedroassis/repos","events_url":"https://api.github.com/users/pedroassis/events{/privacy}","received_events_url":"https://api.github.com/users/pedroassis/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-14T20:47:07Z","updated_at":"2015-04-14T23:29:12Z","closed_at":"2015-04-14T23:24:50Z","body":"You should get a copy of the defaults values for each call of the decorated function.\r\nThe stated is being shared.\r\n\r\n    var decorated = easyParams(1, \"dfsfds\", {}, function (requiredParameter, optionalString, optionalObject, callback) {\r\n        optionalObject[new Date().getTime()] = true\r\n        console.log(optionalObject);\r\n        if (callback) callback();\r\n    });\r\n\r\n    decorated(1); // Logged the optional object, and it has one prop, added on the function\r\n    decorated(2); // Logged the optional object, and it has two props, the one added on the previous function call and the new one"},"comment":{"url":"https://api.github.com/repos/tuvistavie/js-easy-params/issues/comments/93110283","html_url":"https://github.com/tuvistavie/js-easy-params/issues/1#issuecomment-93110283","issue_url":"https://api.github.com/repos/tuvistavie/js-easy-params/issues/1","id":93110283,"user":{"login":"tuvistavie","id":1436271,"avatar_url":"https://avatars.githubusercontent.com/u/1436271?v=3","gravatar_id":"","url":"https://api.github.com/users/tuvistavie","html_url":"https://github.com/tuvistavie","followers_url":"https://api.github.com/users/tuvistavie/followers","following_url":"https://api.github.com/users/tuvistavie/following{/other_user}","gists_url":"https://api.github.com/users/tuvistavie/gists{/gist_id}","starred_url":"https://api.github.com/users/tuvistavie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuvistavie/subscriptions","organizations_url":"https://api.github.com/users/tuvistavie/orgs","repos_url":"https://api.github.com/users/tuvistavie/repos","events_url":"https://api.github.com/users/tuvistavie/events{/privacy}","received_events_url":"https://api.github.com/users/tuvistavie/received_events","type":"User","site_admin":false},"created_at":"2015-04-14T23:29:12Z","updated_at":"2015-04-14T23:29:12Z","body":"Thanks for the catch, let's leave this behavior for Python :smile: \r\nFixed and released as 0.1.5."}}