Skip to content

Instantly share code, notes, and snippets.

@nwjsmith
Created July 11, 2013 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nwjsmith/5976146 to your computer and use it in GitHub Desktop.
Save nwjsmith/5976146 to your computer and use it in GitHub Desktop.
renameKey = (from, to, obj) ->
results = {}
for k, v of obj
if k == from
results[to] = v
else
results[k] = v
results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment