aws-v3-sdk 1.0.18 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -167,6 +167,33 @@ class DocumentClient {
167
167
  })
168
168
  }
169
169
 
170
+ scanAsync (params, callback) {
171
+ return new Promise((resolve, reject) => {
172
+ const getCommand = new ScanCommand(params)
173
+ documentClient.send(getCommand, (err, response) => {
174
+ if (err || !response) {
175
+ return ScanCommand(err)
176
+ }
177
+ if (response.Items) {
178
+ return resolve(response)
179
+ } else if (!response.Items) {
180
+ return resolve(null)
181
+ }
182
+ })
183
+
184
+ }).then(result => {
185
+ if (callback && typeof callback === 'function') {
186
+ callback(null, result)
187
+ }
188
+ return result
189
+ }).catch(error => {
190
+ if (callback && typeof callback === 'function') {
191
+ callback(error, null)
192
+ }
193
+ return Promise.reject(error)
194
+ })
195
+ }
196
+
170
197
  putAsync (params, callback) {
171
198
  return new Promise((resolve, reject) => {
172
199
  let item = params.Item
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aws-v3-sdk",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "AWS v3 SDK Utils",
5
5
  "main": "index.js",
6
6
  "scripts": {