read-file-safe
Read files without try catch
Last updated 6 years ago by bconnorwhite .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install read-file-safe 
SYNC missed versions from official npm registry.
read-file-safe NPM TypeScript Coverage Status GitHub Stars Twitter Follow

Read files without try catch.

  • Returns string or Buffer if successful.
  • Returns undefined on error rather than throwing.

Installation

yarn add read-file-safe
npm install read-file-safe

API

import { readFile, readFileSync } from "read-file-safe";

readFile(path: string) => Promise<string | undefined>;

readFileSync(path: string) => string | undefined;

Dev DependenciesDavid


License license

MIT


Related Packages

Current Tags

  • 1.0.10                                ...           latest (6 years ago)

11 Versions

  • 1.0.10                                ...           6 years ago
  • 1.0.9                                ...           6 years ago
  • 1.0.8                                ...           6 years ago
  • 1.0.7                                ...           6 years ago
  • 1.0.6                                ...           6 years ago
  • 1.0.5                                ...           6 years ago
  • 1.0.4                                ...           6 years ago
  • 1.0.3                                ...           6 years ago
  • 1.0.2                                ...           6 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 2
Last Month 11
Dependencies (0)
None
Dev Dependencies (4)

Copyright 2013 - present © cnpmjs.org | Home |