1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1 3 | import ensureItemIsObject from './lib/ensureItemIsObject'; import unmarshal from './unmarshal'; /** * Translates a DynamoDb formatted object (a response from DynamoDb sdk) into * a plain javascript object with DynamoDb AttributeValue objects. * * @param {Object} item DynamoDb formatted object. * @returns {Object} A javascript object in normal form. */ function unmarshalItem(item) { return unmarshal({M: item}); } export default ensureItemIsObject(unmarshalItem); |