This file contains 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
var docClient = require("../aws").docClient; | |
var co = require("co"); | |
var scanAll = co.wrap(function*( | |
tableName, | |
previousItems, | |
lastEvaluatedKey | |
) { | |
var items = previousItems || []; |
This file contains 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
/** | |
* Transform a to another format | |
* @param {object} a - Sample data | |
* @return {object} Returns transformed a | |
*/ | |
function transform(a) { | |
var new_a = {}; | |
(function find_msg(item, str) { | |
for (var key in item) { | |
if (key === 'message') new_a[str] = item[key]; |
NewerOlder