INNER CODE UNIT · JavaScript
unmarshalBuffer
99x/serverless-dynamodb-local · src/seeder.js:97
function unmarshalBuffer(json) {
_.forEach(json, function(value, key) {
// Null check to prevent creation of Buffer when value is null
if (value !== null && value.type==="Buffer") {
json[key]= new Buffer(value.data);
}
});
return json;
}
/**
* Scrapes seed files out of a given location. This file may contain
* either a simple json object, or an array of simple json objects. An array
* of json objects is returned.
*
* @param {any} location the filename to read seeds from.
*/
function getSeedsAtLocation(location) {