Socket
Book a DemoInstallSign in
Socket

cat

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cat

cat will read the contents of an url

latest
npmnpm
Version
0.2.0
Version published
Weekly downloads
1.3K
65.63%
Maintainers
1
Weekly downloads
 
Created
Source

cat

cat will read the contents of an url. it's available through npm

npm install cat

it will read your files

var cat = require('cat');

cat('myfile.txt', console.log);             // reads the file as utf-8 and returns it output
cat('file://myfile.txt', console.log);      // same as above

and your http / https urls

cat('http://google.com', console.log);      // cat also follows any redirects
cat('https://github.com', console.log);     // and cat read https
cat('http://fail.google.com', console.log); // if a status code != 2xx is received it will 
                                            // call the callback with an error.

Keywords

cat

FAQs

Package last updated on 29 Jun 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