Options
All
  • Public
  • Public/Protected
  • All
Menu

Module with functions related to flusight-csv-tools cache

Index

Variables

CACHE_DIR

CACHE_DIR: string = path.join(userCacheDir(), 'flusight-csv-tools')

Cache directory path

Functions

isInCache

  • isInCache(cacheFile: string): Promise<boolean>
  • Tell if the file is present in cache

    Parameters

    • cacheFile: string

    Returns Promise<boolean>

readCsv

  • readCsv(filePath: string): Promise<Array<any>>
  • Read csv using papaparse

    Parameters

    • filePath: string

    Returns Promise<Array<any>>

readFromCache

  • readFromCache(cacheFile: string): Promise<any>
  • Return data read from cache for the given filename

    Parameters

    • cacheFile: string

    Returns Promise<any>

readJSON

  • readJSON(filePath: string): Promise<any>
  • Read json from file

    Parameters

    • filePath: string

    Returns Promise<any>

writeInCache

  • writeInCache(cacheFile: string, data: string): Promise<string>
  • Write the provided data in cacheFile

    Parameters

    • cacheFile: string
    • data: string

    Returns Promise<string>

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc