{"action":"closed","issue":{"url":"https://api.github.com/repos/bryanjos/elixirscript/issues/158","repository_url":"https://api.github.com/repos/bryanjos/elixirscript","labels_url":"https://api.github.com/repos/bryanjos/elixirscript/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/bryanjos/elixirscript/issues/158/comments","events_url":"https://api.github.com/repos/bryanjos/elixirscript/issues/158/events","html_url":"https://github.com/bryanjos/elixirscript/issues/158","id":136757100,"number":158,"title":"Update JS.update to take a map","user":{"login":"bryanjos","id":1257573,"avatar_url":"https://avatars.githubusercontent.com/u/1257573?v=3","gravatar_id":"","url":"https://api.github.com/users/bryanjos","html_url":"https://github.com/bryanjos","followers_url":"https://api.github.com/users/bryanjos/followers","following_url":"https://api.github.com/users/bryanjos/following{/other_user}","gists_url":"https://api.github.com/users/bryanjos/gists{/gist_id}","starred_url":"https://api.github.com/users/bryanjos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryanjos/subscriptions","organizations_url":"https://api.github.com/users/bryanjos/orgs","repos_url":"https://api.github.com/users/bryanjos/repos","events_url":"https://api.github.com/users/bryanjos/events{/privacy}","received_events_url":"https://api.github.com/users/bryanjos/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bryanjos/elixirscript/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-26T17:15:28Z","updated_at":"2016-02-26T19:00:12Z","closed_at":"2016-02-26T19:00:12Z","body":"`JS.update` is a function used to mutate the state of an object when needed in JavaScript. It doesn't work on anything created directly by elixirscript (everything is immutable), but may be helpful when dealing with situations where your only option is to mutate the data (i.e. forced by a js framework, library, or the environment itself).\r\n\r\nThis is a proposal to change the current `JS.update` function to accept a map.\r\n```elixir\r\n#old\r\nJS.update(obj, \"property\", new_value)\r\n\r\n#new\r\nJS.update(obj, %{ \"property\" => new_value })\r\n```\r\n\r\nThis would allow for updating multiple properties at once"}}