Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    headpublic

    head

    File head -n

    Installation

    $ npm install visionmedia/node-head
    

    Example

    var head = require('head');
     
    console.dir(head('Readme.md').toString());
    console.dir(head('Readme.md', 100).toString());
    console.dir(head('Readme.md', 50).toString());
    console.dir(head('Readme.md', 20).toString());
    console.dir(head('Readme.md', 10).toString());
    console.dir(head('Readme.md', 4).toString());
     
    head('Readme.md', 10, function(err, buf){
      if (err) throw err;
      console.dir(buf.toString());
    });

    License

    MIT

    Keywords

    none

    install

    npm i head

    Downloadsweekly downloads

    33

    version

    1.0.0

    license

    none

    last publish

    collaborators

    • avatar