Skip to content

Instantly share code, notes, and snippets.

@foxbunny
Created September 6, 2013 14:13
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 foxbunny/6464381 to your computer and use it in GitHub Desktop.
Save foxbunny/6464381 to your computer and use it in GitHub Desktop.
propset: (o, p, v=null) ->
[f, r...] = p.split('.')
if not f of o
o[f] = if not r.length then v else {}
h.propset o[f], r.join '.', v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment