51Degrees IP Intelligence for Node.js

OptionsExtension Class Reference

Detailed Description

Static Public Member Functions

static getElement (options, elementName)
 Get the element with the given name from the pipeline options.
static getDataFilePath (options)
 Get the data file path from the pipeline options.
static setDataFilePath (options, newDataFilePath)
 Set the data file path in the pipeline options.
static updateElementPath (options, appendDir)
 Update relative element paths by prepending the supplied directory.
static getResourceKey (options)
 Get the resource key from the pipeline options.
static setResourceKey (options, resourceKey)
 Set the resource key in the pipeline options.

Member Function Documentation

◆ getDataFilePath()

OptionsExtension::getDataFilePath ( options)
inlinestatic

Get the data file path from the pipeline options.

Parameters
{object}options pipeline options
Returns
{string} the data file path or undefined if not set

◆ getElement()

OptionsExtension::getElement ( options,
elementName )
inlinestatic

Get the element with the given name from the pipeline options.

Parameters
{object}options pipeline options
{string}elementName name of the element to get
Returns
{object} the element or undefined if not found

◆ getResourceKey()

OptionsExtension::getResourceKey ( options)
inlinestatic

Get the resource key from the pipeline options.

Parameters
{object}options pipeline options
Returns
{string} the resource key or undefined if not set
Examples
cloud/getallproperties-console/getAllProperties.js, cloud/gettingstarted-console/gettingStarted.js, and cloud/mixed/gettingstarted-console/gettingStarted.js.

◆ setDataFilePath()

OptionsExtension::setDataFilePath ( options,
newDataFilePath )
inlinestatic

Set the data file path in the pipeline options.

Parameters
{object}options pipeline options
{string}newDataFilePath the new data file path
Returns
{void}

◆ setResourceKey()

OptionsExtension::setResourceKey ( options,
resourceKey )
inlinestatic

Set the resource key in the pipeline options.

Parameters
{object}options pipeline options
{string}resourceKey the new resource key
Returns
{void}
Examples
cloud/getallproperties-console/getAllProperties.js, cloud/gettingstarted-console/gettingStarted.js, and cloud/mixed/gettingstarted-console/gettingStarted.js.

◆ updateElementPath()

OptionsExtension::updateElementPath ( options,
appendDir )
inlinestatic

Update relative element paths by prepending the supplied directory.

Parameters
{object}options pipeline options
{string}appendDir directory to prepend to relative paths
Returns
{void}