open-index/open-npm huggingface dataset:
npm package: @headforwards-spd/aws-dynamo
Description: A handful of utility tools for AWS dynamoDb functions
Latest version: 1.0.1

# AWS dynamoDb Wrapper

A handful of utility tools for AWS dynamoDb functions

## Usage:

```javascript
const dynamo = require('@headforwards-spd/aws-dynamo');
```

### list()

```javascript
const tableName                 = 'my-table-name';
const keyConditionExpression    = 'my-key-condition-expression';
const expressionAttributeValues = 'my-expression-attribute-values';

function listMyItems() {

    return new Promise((resolve, reject) => {

        try {

            const params = {
                TableName:                 tableName,
                KeyConditionExpression:    keyConditionExpression,
                ExpressionAttributeValues: expressionAttributeValues
            };

            dynamo.list(params, resolve, reject);

        } catch (error) {

            reject(error);
        }
    });
}
```
npm package: @headforwards-spd/aws-s3
Description: A handful of utility tools for AWS s3 functions
Latest version: 1.2.0

# AWS s3 Wrapper

A handful of utility tools for AWS s3 functions

http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html

## Usage:

```javascript
const s3 = require('@headforwards-spd/aws-s3');
```

### saveDataUri()

```javascript
const s3Bucket  = 'my-s3-bucket';
const dataUri   = 'my-data-uri';
const objectKey = 'my-object-key';

function saveMyDataUri() {

    return new Promise((resolve, reject) => {
        
        try {

            s3.saveDataUri(s3Bucket, dataUri, objectKey)
                .then(
                    response => resolve(response),
                    error => reject(error)
                );

        } catch (error) {

            reject(error);
        }
    });
}
```

### getObjectUrl()

```javascript
const s3Bucket  = 'my-s3-bucket';
const objectKey = 'my-object-key';

function myObjectGetUrlIs() {

    return new Promise((resolve, reject) => {

        try {

            s3.getObjectUrl(s3Bucket, objectKey)
                .then(
                    getObjectUrl => resolve(getObjectUrl),
                    error => reject(error)
                );
        } catch (error) {

            reject(error);
        }
    });
}
```

### putObjectUrl()

```javascript
const s3Bucket    = 'my-s3-bucket';
const objectKey   = 'my-object-key';
const contentType = 'my-object-content-type';

function myObjectPutUrlIs() {

    return new Promise((resolve, reject) => {

        try {

            s3.putObjectUrl(s3Bucket, objectKey, contentType)
                .then(
                    putObjectUrl => resolve(putObjectUrl),
                    error => reject(error)
                );

        } catch (error) {

            reject(error);
        }
    });
}
```