<commit_before>var AWS = require('aws-sdk')
var uuid = require('uuid')

var config = require('../config.json')
var encryption = require('../lib/encryption')

module.exports.put = function(form) {
  var docClient = new AWS.DynamoDB.DocumentClient()
  var payload = {
    id: uuid.v4(),
    data: encryption.encrypt(JSON.stringify(form))
  }
  return docClient.put({TableName: config.TABLE_NAME, Item: payload})
}<commit_msg>update receive database.js with callback<commit_after>var AWS = require('aws-sdk')
var uuid = require('uuid')

var config = require('../config.json')
var encryption = require('../lib/encryption')

module.exports.put = function(form, callback) {
  var docClient = new AWS.DynamoDB.DocumentClient()
  var payload = {
    id: uuid.v4(),
    data: encryption.encrypt(JSON.stringify(form))
  }
  return docClient.put({TableName: config.TABLE_NAME, Item: payload}, callback())
}
{'fraction_non_alphanumeric': 0.15754189944134078, 'fraction_numerical': 0.0022346368715083797, 'mean_word_length': 4.670886075949367, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2054324', 'n_tokens_mistral': 281, 'n_tokens_neox': 283, 'n_words': 64}