Injector

Injector

Creates a basic injector

Constructor

new Injector(skv_config)

Source:
Parameters:
Name Type Description
skv_config struct

Struct passed in when initializing the injector

Members

taxYears

Source:

all injectors return manipulated array of tax years

Methods

(static) requiredKeysCheck(skv_to_check, arr_required_keys) → {struct}

Source:

If a key isn't present in the struct then throw error

Parameters:
Name Type Description
skv_to_check struct
arr_required_keys array

Array of strings to check

Returns:

In json api format any missing keys

Type
struct

validate(arr_valid_keys) → {boolean}

Source:

Check the keys passed in to the injector are valid

Parameters:
Name Type Description
arr_valid_keys array

the allowable keys

Returns:

valid or not?

Type
boolean