var _ = require('underscore');

module.exports.toBoolean = function(value) {
  var bValue = value;
  if (_.isString(bValue)) {
    switch (bValue.toLowerCase().trim()) {
      case "true":
      case "1":
        bValue = true;
        break;
      case "false":
      case "0":
      case null:
        bValue = false;
        break;
      default:
        bValue = false;
    }
  }
  return bValue;
};

@@ -397,8 +397,444 @@
 lue;%0A%7D;%0A
+%0A%0Amodule.exports.cfnResponseLocalTesting = function() %7B%0A  console.log('Using local CFN response object');%0A  return %7B%0A    FAILED : 'FAILED',%0A    SUCCESS: 'SUCCESS',%0A    send: function(event, context, status, responseData) %7B%0A        var msg = %7B%0A          event: event,%0A          context: context,%0A          result: status,%0A          responseData: responseData%0A        %7D;%0A        console.log(JSON.stringify(msg, null, ' '));%0A    %7D%0A  %7D;%0A%7D;%0A

Add cfg-response shim for local testing of CustomResources