SHARE
TWEET

Untitled

a guest Sep 17th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ...
  2. const getModule = (config) => {
  3.   const documentClient = new AWS.DynamoDB.DocumentClient(config)
  4.  
  5.   return ({
  6.     // ...
  7.     getByPK: (params, attributes = undefined) =>
  8.       documentClient
  9.         .get(
  10.           mergedParams(params, attributes ? projectionExpression(attributes) : {})
  11.         )
  12.         .promise()
  13.         .then(data => (Object.keys(data).length ? data.Item : undefined))
  14.   })
  15. }
  16. // ...
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top