MCPcopy Create free account
hub / github.com/Comcast/Speed-testJS / getItem

Function getItem

modules/dynamo.js:28–44  ·  view source on GitHub ↗
(param, callback)

Source from the content-addressed store, hash-verified

26 * @param callback handles the response
27 */
28var getItem = function (param, callback) {
29 try {
30 dynamo.getItem(param, function (err, data) {
31 if (!err) {
32 console.log('get success');
33 if (typeof(callback) === 'function') {
34 callback(data);
35 }
36 } else {
37 throw (err);
38 }
39 });
40 }
41 catch (err) {
42 console.log('error in getting data' + err);
43 }
44};
45
46/**
47 * Creates a new Item or replaces an old item with a new item

Callers

nothing calls this directly

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected