3.4.1 • Published 3 years ago

noodle-utils v3.4.1

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

noodle-utils 3.0.0

src/errors/DataNotFound.js

new DataNotFound()

Used when an item isn't found in Dynamo on read

Returns
  • Void

DataNotFound.constructor(params)

Constructor for error

Parameters
NameTypeDescription
paramsanyAny params that need to be passed to parent 
Returns
  • Void

src/errors/InvalidQueueReadItem.js

new InvalidQueueReadItem()

Used when an item is passed to the DynamoReadQueue that doesn't contain the corret props

Returns
  • Void

InvalidQueueReadItem.constructor(params)

Constructor for error

Parameters
NameTypeDescription
paramsanyAny params that need to be passed to parent 
Returns
  • Void

src/errors/SizeExceeded.js

new SizeExceeded()

Used when the size of a write item to dynamo is too big

Returns
  • Void

SizeExceeded.constructor(params)

Constructor of error

Parameters
NameTypeDescription
paramsanyAny params to be passed to the Error parent 
Returns
  • Void

src/methods/isUndefined.js

isUndefined(value)

Helper method to determine if a value is undefined or not

Parameters
NameTypeDescription
valueanyThe value to check 
Returns
  • boolean Whether the value is undefined or not

src/methods/pipeline.js

pipeline(fns)

Method to handle sequential tasks that rely on the output of the previous task

Parameters
NameTypeDescription
fnsArray.<Function>The functions you would like to run over the input 
Returns
  • any The result of the pipeline processing

pipelineClosureMethod(func, args)

This method allows you to pass more arguments through the pipeline via a closure

Parameters
NameTypeDescription
funcFunctionThe method you want to run in the pipeline 
argsanyThe closure args you want to use in the method 
Returns
  • Function A method to be called with a new argumnet as well as those captured in the closure

src/methods/sleep.js

sleep(time)

Method to handle sequential tasks that rely on the output of the previous task

Parameters
NameTypeDescription
timenumberThe time, in ms, to sleep for 
Returns
  • Nothing

src/classes/dynamo/DynamoReadBatch.js

new DynamoReadBatch()

Creates a new Queue for pushing data to Dynamo.

Returns
  • Void

DynamoReadBatch.constructor(dynamoCredentials, dynamoRegion, tableName)

Constructor for DynamoReadBatch

Parameters
NameTypeDescription
dynamoCredentialsmodule:dynamo.DynamoCredentialsThe credentials for a Dynamo table 
dynamoRegionstringThe region of the Dynamo table we're using 
tableNamestringThe name of the table we want to store data in 
Returns
  • Void

src/classes/dynamo/DynamoReadQueue.js

new DynamoReadQueue()

Creates a new Queue for pushing data to Dynamo.

Returns
  • Void

DynamoReadQueue.constructor(dynamoCredentials, dynamoRegion, tableName)

Constructor for DynamoReadQueue

Parameters
NameTypeDescription
dynamoCredentialsmodule:dynamo.DynamoCredentialsThe credentials for a Dynamo table 
dynamoRegionstringThe region of the Dynamo table we're using 
tableNamestringThe name of the table we want to store data in 
Returns
  • Void

DynamoReadQueue.push(item, callback)

Pushes item to be read into the queue

Parameters
NameTypeDescription
itemReadItemAn item to be read from Dynamo 
callbackFunctionThe method to be called once the item has been read 
Returns
  • Void

DynamoReadQueue.pushBatch(batch, callback)

Method to push items to our queue

Parameters
NameTypeDescription
batchArray.<ReadItem>A batch of items to push into the queue 
callbackFunctionA method to be called for each read item 
Returns
  • Nothing

validateItem(item)

Validates that an item pushed to the queue is valid

Parameters
NameTypeDescription
itemReadItemSpecifies what to read from the database 
Returns
  • Void

validateCallback(callback)

Validates that the callback fulfils the requirements for a read

Parameters
NameTypeDescription
callbackFunctionThe method to validate 
Returns
  • Void

src/classes/dynamo/DynamoWriteQueue.js

new DynamoWriteQueue()

Creates a new Queue for pushing data to Dynamo.

Returns
  • Void

DynamoWriteQueue.constructor(dynamoCredentials, dynamoRegion, tableName)

Constructor for DynamoWriteQueue

Parameters
NameTypeDescription
dynamoCredentialsmodule:dynamo.DynamoCredentialsThe credentials for a Dynamo table 
dynamoRegionstringThe region of the Dynamo table we're using 
tableNamestringThe name of the table we want to store data in 
Returns
  • Void

DynamoWriteQueue.push(item, callback)

Method to push items to our queue

Parameters
NameTypeDescription
itemobjectAny item that we want to push to Dynamo 
callbackFunctionA method to call once the item has been stored 
Returns
  • Nothing

DynamoWriteQueue.pushBatch(batch, callback)

Method to push items to our queue

Parameters
NameTypeDescription
batchArray.<object>A batch of items to push into the queue 
callbackFunctionA method to call once the item has been stored 
Returns
  • Nothing

Documentation generated with doxdox.

3.4.0

3 years ago

3.4.1

3 years ago

3.3.2

3 years ago

3.3.1

3 years ago

3.3.0

3 years ago

3.2.0

4 years ago

3.1.0

4 years ago

3.0.3

4 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.1.0

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago