fcf.require() function
Package: fcf-framework-core
File: fcf-framework-core:fcf.js
Available from version: 2.0.2
Performs module loading
For more information on loading and declaring modules, see "Modules" page
Arguments
- Module path in FCF notation
[string ] a_modules
- Array of strings containing paths to modules in FCF notation
- Object containing additional options
-
boolean quiet = false - If the parameter is equal totrue , then the output of the module error message to the console is not displayed -
boolean async = true - If the parameter is equal totrue , then the loading of modules on the browser side is performed synchronously. To get the result synchronously, you need to call theresult method of the returnedfcf.Actions object
Result
- Returns a lazy object that will contain an array containing module data
Example: Asynchronous module loading
let [moduleData] = await fcf.require("module.js");
Example: Synchronous module loading
let [moduleData] = fcf.require("module.js", {async: false}).result ();