New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

resource-reader

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resource-reader

Handles streaming a file resource, emitting content-type event

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

resource-reader

Stability - 2 Unstable

A simple resource Readable stream that includes content-type event identification

Usage

    var ResourceReader = require("resource-reader").ResourceReader;
    var rr = new ResourceReader(root /* root dir of resources */, filepath /* file location relative to root */);
    rr.on("noresource", function(err) {/* handle file not exist information */});
    rr.on("ctype", function(ctype) {/* content-type identifier information suitable for piping to response header */});
    rr.on("error", function(err) {/* handle stream error information */});
    rr.on("data", function(chunk) {/* handle writing Buffer chunk data */});
    rr.on("end", function() {/* handle end of data stream */});

Keywords

resources

FAQs

Package last updated on 25 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts