Skip to content

Instantly share code, notes, and snippets.

@djsmith42
Created February 3, 2017 14:14
Show Gist options
  • Save djsmith42/7e4a026e641a3544e9887e67c3a60c84 to your computer and use it in GitHub Desktop.
Save djsmith42/7e4a026e641a3544e9887e67c3a60c84 to your computer and use it in GitHub Desktop.
const obj = {foo: 1, bar: 2, biz: 3, baz: 4}
const x = subset(obj, ['foo', 'baz'])
// x == {foo: 1, baz: 4}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment