tree: 88c5dc93d31ea91856f9b48f38059a1c02a63c30 [path history] [tgz]
  1. bin.js
  2. example.js
  3. index.js
  4. package.json
  5. README.md
tests/src/integration/zipaction/actions/cat/node_modules/cat/README.md

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.