appendPackage() method from fcf.Configuration class
Package: fcf-framework-core
File: fcf-framework-core:fcf.js
Available from version: 2.0.2
Adds a configuration to an object as package data. Used to set initial values.
Each time a configuration is added, the data is rebuilt. During rebuild, the configuration parameters are collected in the following order:
-
Default parameters, which are set when the enableDefaultParams flag is set in the constructor
-
Parameters that were added by the
appendPackage method -
Parameters that were added by the
append method.
Arguments
- Configuration object to add. If the object is an instance of the fcf.Configuration class and the fields in the a_config object are changed, then the changes will be reflected in the new object.
Example: Function application
let configuration = new fcf.Configuration();
configuration .append ({value1: 1});
configuration .appendPackage ({value1: 10, value2: 20});
console.log("value1:", configuration .value1);
console.log("value2:", configuration .value2);
Output:
value1: 1
value2: 20