Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@GGAlanSmithee
Last active October 13, 2015 09: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 GGAlanSmithee/3be1e4eec75fa3dc6786 to your computer and use it in GitHub Desktop.
Save GGAlanSmithee/3be1e4eec75fa3dc6786 to your computer and use it in GitHub Desktop.
Reminder to myself of awesome ES(6) features

Reminder to myself of some nice ES(6) features

A nice way to avoid the options parameter so often used

function frob(arg1, arg2, {foo = defFoo, bar = defBar, baz = defBaz}) {
  // just use foo, bar, and baz instead of ops.foo, etc.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment