The package is meant to ease the useage of the Google App Script DriveApp functionalities.
The package allows to explore folders and files using arrays and operators instead of iterators and verbose callback-based method calls.
It is possible to implement filtering with array functions
const recentFilesSize = getFiles("<folder id>")
.filter((p) => p.getLastUpdated() < 7 * 24 * 60 * 60 * 1000)
.reduce((acc, p) => acc + p.getSize());
It is also possible to use an base iterator to implement cursor based pagination:
const filesIterator = DriveApp.getFolderById("<folder id>").getFiles();
let page = fromDriveIterator(filesIterator, 10);
page = continueFiles(filesIterator.getContinuationToken(), 10);
Have a look to the e2e test.