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
const lambda_handler = require('lambda-handler'); | |
exports.handler = lambda_handler(( event, ctx, done ) => { | |
// This will log a handled error to CloudWatch and return the error to AWS Lambda | |
throw 'BOOM!'; | |
}); |
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
String.prototype.encodeAsPeriods = function () { | |
var characterArray = this.split(''); | |
var charCodeArray = characterArray.map(function (char) { | |
return char.charCodeAt(); | |
}); | |
var periodEncodedCharArray = charCodeArray.map(function (charCode) { | |
var charCodeString = "" + charCode; | |
var digitArray = charCodeString.split(''); | |
var periodStringArray = digitArray.map(function (digitString) { | |
var digit = parseInt(digitString, 10); |