0.0.1 • Published 5 years ago

@fox-finder/base v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

FoxBase

Base modules for @fox-finder

Usage

yarn add @fox-finder/base
import MyFsService from 'my-fs-service';
import { IFile, FoxFileProvider } from '@fox-finder/base'

export class MyFileProvider implements FoxFileProvider {

  constructor(options) {
    this.myFsService = new MyFsService(options)
  }

  listFile(path: string, keyword?: string): Promise<IFile[]> {
    return new Promise((resolve, reject) => {
      return this.myFsService.getFileList(path, fileList => {
        resolve(fileList.map(file => ({
          // ...
        })))
      })
    });
  }

  // other methods...
}

Acknowledgements