Created
February 28, 2016 08:14
-
-
Save maowug/ea115b6766a3e5fe5e73 to your computer and use it in GitHub Desktop.
arguments de-constructing babel6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isMessageAttributeValid ({DataType} = {}) { | |
console.log(arguments) | |
if (!DataType) { | |
// throw new Error('A MessageAttribute must have a DataType key') | |
} | |
if (typeof DataType !== 'string') { | |
// throw new Error('The DataType key of a MessageAttribute must be a String') | |
} | |
return true | |
} | |
isMessageAttributeValid(1) | |
// {"0":1} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment