<commit_before>'use strict';

var AWS = require('aws-sdk');
var memoize = require('./lib/util/memoizeWithOptions');
var promisifyAll = require('./lib/util/promisifyAll');

function dynamoDb(options) {
  return promisifyAll(new AWS.DynamoDB(options));
}

/**
 * Returns an instance of AWS.DynamoDB which has Promise methods
 * suffixed by "Promised"
 *
 * e.g.
 * getItem : getItemPromised
 *
 * @param options
 */
module.exports = memoize(dynamoDb);<commit_msg>dynamoDb: add support for DynamoDB.DocumentClient<commit_after>'use strict';

var AWS = require('aws-sdk');
var memoize = require('./lib/util/memoizeWithOptions');
var promisifyAll = require('./lib/util/promisifyAll');

function dynamoDb(options) {
  return promisifyAll(new AWS.DynamoDB(options));
}

function documentClient(options) {
  return promisifyAll(new AWS.DynamoDB.DocumentClient(options));
}

/**
 * Returns an instance of AWS.DynamoDB which has Promise methods
 * suffixed by "Promised"
 *
 * e.g.
 * getItem : getItemPromised
 *
 * @param options
 */
module.exports = memoize(dynamoDb);

/**
 * Returns an instance of AWS.DynamoDB.DocumentClient
 * which has Promise methods suffixed by "Promised"
 *
 * e.g.
 * get: getPromised
 *
 * @param options
 */
module.exports.documentClient = memoize(documentClient);
{'fraction_non_alphanumeric': 0.13463035019455252, 'fraction_numerical': 0.0, 'mean_word_length': 4.792792792792793, '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': '2517065', 'n_tokens_mistral': 424, 'n_tokens_neox': 422, 'n_words': 97}