How to use the @mapbox/dyno.deserialize function in @mapbox/dyno

To help you get started, we’ve selected a few @mapbox/dyno examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mapbox / dynamodb-replicator / lib / replicate.js View on Github external
params.RequestItems[process.env.ReplicaTable] = Object.keys(allRecords).map(function(key) {
    var change = allRecords[key].pop();
    if (change.eventName === 'INSERT' || change.eventName === 'MODIFY') {
      return {
        PutRequest: { Item: Dyno.deserialize(JSON.stringify(change.dynamodb.NewImage)) }
      };
    } else if (change.eventName === 'REMOVE') {
      return {
        DeleteRequest: { Key: Dyno.deserialize(JSON.stringify(change.dynamodb.Keys)) }
      };
    }
  });
github mapbox / dynamodb-replicator / lib / replicate.js View on Github external
params.RequestItems[process.env.ReplicaTable] = Object.keys(allRecords).map(function(key) {
    var change = allRecords[key].pop();
    if (change.eventName === 'INSERT' || change.eventName === 'MODIFY') {
      return {
        PutRequest: { Item: Dyno.deserialize(JSON.stringify(change.dynamodb.NewImage)) }
      };
    } else if (change.eventName === 'REMOVE') {
      return {
        DeleteRequest: { Key: Dyno.deserialize(JSON.stringify(change.dynamodb.Keys)) }
      };
    }
  });

@mapbox/dyno

Simple DynamoDB client

MIT
Latest version published 1 year ago

Package Health Score

60 / 100
Full package analysis

Popular @mapbox/dyno functions