Class: Provider

providers/Provider~Provider(storage)

Provider

Constructor

new Provider(storage)

Defines the base provider for all providers.

A provider manages resources from its associated storage.

Parameters:
Name Type Description
storage module:storages/Storage~Storage

The storage to use to store provider resources

Source:
Throws:

If storage is not valid

Type
TypeError

Methods

executeCallback(callbackopt, erroropt, callbackopt)

Executes the given callback or log the error message if no callback specified.

It assumes that the second argument is the error. All arguments, except the callback itself, will be specified as arguments when executing the callback.

Parameters:
Name Type Attributes Description
callback function <optional>

The function to execute

error Error <optional>

An eventual error to pass to the callback

callback callback <optional>

The function to call, if not specified the error is logged

Source: