FCF 2.0 development in progress...
> > > > > >
[News] [JS Packages API] [JS Downloads] [Donate to the project] [Contacts]

empty() method from fcf.Actions class

boolean empty()

Class: fcf.Actions

Package: fcf-framework-core

File: fcf.js

Available from version: 1.0.16

Returns true if the fcf.Actions object has no scheduled tasks (the stack is empty) and execution has not yet started. This allows determining whether the entire action chain is idle or still awaiting execution.

Result
boolean
- Returns true if the action queue is empty and no actions are currently running; otherwise, false

Example:

let fcf = require("fcf-framework-core"); async function main() { let actions = fcf.actions(); await actions .then(()=>{ fcf.log.log("APP", "The value of the state empty: ", actions.empty()) }); fcf.log.log("APP", "The state of the empty flag after completing all actions:", actions.empty()) } main();

Output:

2026-05-22 23:40:11.645 [PID:337617] [LOG] [MOD:APP]: The value of the state empty: false 2026-05-22 23:40:11.653 [PID:337617] [LOG] [MOD:APP]: The state of the empty flag after completing all actions: true