@begin/data
Advanced tools
Comparing version 1.1.4 to 1.1.5-RC.0
{ | ||
"name": "@begin/data", | ||
"version": "1.1.4", | ||
"version": "1.1.5-RC.0", | ||
"description": "Begin Data is a durable and fast key/value document store built on top of DynamoDB.", | ||
@@ -8,3 +8,4 @@ "main": "src/index.js", | ||
"lint": "eslint src --ignore-pattern node_modules --fix", | ||
"test": "npm run lint && tape test/test.js | tap-spec" | ||
"test": "npm run lint && tape test/test.js | tap-spec", | ||
"rc": "npm version prerelease --preid RC" | ||
}, | ||
@@ -11,0 +12,0 @@ "license": "Apache-2.0", |
# Begin Data | ||
## [`@begin/data`](https://www.npmjs.com/package/@begin/data) | ||
[ ](https://app.codeship.com/projects/305743) | ||
[](https://github.com/smallwins/begin-data/actions?query=workflow%3A%22Node+CI%22) | ||
@@ -41,10 +41,10 @@ Begin Data is an easy to use, fast, and durable key/value and document store built on top of DynamoDB. Originally built for [Begin serverless apps](https://begin.com), Begin Data’s core API has three simple methods: `get`, `set`, and `destroy`. | ||
BillingMode: "PAY_PER_REQUEST" | ||
KeySchema: | ||
- | ||
KeySchema: | ||
- | ||
AttributeName: "scopeID" | ||
KeyType: "HASH" | ||
- | ||
- | ||
AttributeName: "dataID" | ||
KeyType: "RANGE" | ||
SSESpecification: | ||
SSESpecification: | ||
Enabled: "false" | ||
@@ -57,3 +57,3 @@ TimeToLiveSpecification: | ||
> Note: projects not based on [Architect](https://arc.codes) will need a `BEGIN_DATA_TABLE_NAME` environment variable. You can also use this env var to override and name the table anything you want. This also allows for multiple apps to share a single table. | ||
### API | ||
@@ -68,3 +68,3 @@ | ||
- `data.get(params[, callback])` → `[Promise]` for retreiving data | ||
- `data.set(params[, callback])` → `[Promise]` for writing data | ||
- `data.set(params[, callback])` → `[Promise]` for writing data | ||
- `data.destroy(params[, callback])` → `[Promise]` for removing data | ||
@@ -86,3 +86,3 @@ | ||
let taco = await data.set({ | ||
table: 'tacos', | ||
table: 'tacos', | ||
key: 'al-pastor' | ||
@@ -92,7 +92,7 @@ }) | ||
All documents have a `key`. If no `key` is given, `set` will generate a unique `key`. | ||
All documents have a `key`. If no `key` is given, `set` will generate a unique `key`. | ||
```javascript | ||
let token = await data.set({ | ||
table: 'tokens', | ||
table: 'tokens', | ||
}) | ||
@@ -119,3 +119,3 @@ // {table:'tokens', key:'LCJkYX9jYWwidW50RhSU'} | ||
let yum = await data.get({ | ||
table: 'tacos', | ||
table: 'tacos', | ||
key: 'baja' | ||
@@ -140,3 +140,3 @@ }) | ||
await data.destroy({ | ||
table: 'tacos', | ||
table: 'tacos', | ||
key: 'pollo' | ||
@@ -143,0 +143,0 @@ }) |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
35123
29
2