| 11 | const dynamoDb = new AWS.DynamoDB.DocumentClient(); |
| 12 | |
| 13 | const promisify = foo => new Promise((resolve, reject) => { |
| 14 | foo((error, result) => { |
| 15 | if (error) { |
| 16 | reject(error); |
| 17 | } else { |
| 18 | resolve(result); |
| 19 | } |
| 20 | }); |
| 21 | }); |
| 22 | |
| 23 | const getGreeting = firstName => promisify(callback => |
| 24 | dynamoDb.get({ |
no outgoing calls
no test coverage detected