Creates an instance of the class with a list of folders.
An array of Folder
objects to initialize the instance with, from bottom to top.
Searches for a specific value in the environments of the folders, starting from the nearest ancestor folder and moving towards the top ancestor folder.
The key of the value to search for in the folder environments.
The value associated with the specified key if found, otherwise undefined
.
Retrieves a folder by its ID or name.
The ID or name of the folder to retrieve.
The folder object that matches the given ID or name.
Retrieves a folder by its unique identifier.
The unique identifier of the folder to retrieve.
The folder object with the specified ID.
Retrieves a folder by its name.
The name of the folder to retrieve.
The folder object with the specified name.
Retrieves the environments associated with the folders.
An array of environments extracted from the folders.
Converts the current folder structure into a plain JavaScript object representation.
An array of objects representing the folder structure.
Represents a collection of parent folders and provides methods to interact with them.
This class is designed to manage a hierarchy of folders, allowing retrieval of folders by their ID or name, searching for specific values in folder environments, and converting the folder structure into plain JavaScript objects.
Example