newbish / fs-observable

An Observable wrapper around Node's fs APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fs-observable

This package contains RxJS Observables for Node's fs module API.

Installation

$ yarn add fs-observable
$ npm install --save fs-observable

Usage

The example below shows how we can use the observables within this package to read in a file.

import { readFileObservable } from "fs-observable";

export default () => {
  return readFileObservable("./notebook.ipynb").pipe(
    catchError(err => {
      if (err.code === "ENOENT") {
        return false;
      }
      throw err;
    })
  );
};

Support

If you experience an issue while using this package or have a feature request, please file an issue on the issue board.

License

BSD-3-Clause

About

An Observable wrapper around Node's fs APIs

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:TypeScript 98.4%Language:JavaScript 1.6%