osjs-server icon indicating copy to clipboard operation
osjs-server copied to clipboard

Support higher order (async) functions in VFS adapters

Open andersevenrud opened this issue 5 years ago • 0 comments

Right now the higher order functions look like this:

const adapter = (core) => {
  return {
    readdir: vfs => async (path, options) => {},
    // ...
  }
}

It would be nice to have the following option:

const adapter = (core) => {
  return async (vfs) => { // async optional
    readdir: async (path, options) => {},
    // ...
  }
}

~~As well as:~~

This is supported as of 2020-07-22

const adapter = async (core) => {
 // ...
}

andersevenrud avatar Jul 12 '20 03:07 andersevenrud