Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@aretecode/flipfile / src / isFile.ts
Size: Mime:
import { lstatSync } from 'fs'

/**
 * @see https://nodejs.org/docs/latest/api/fs.html#fs_class_fs_stats
 */
export function isFile(file: string) {
  try {
    const result = lstatSync(file).isFile()
    return result
  } catch (excption) {
    return false
  }
}