Now with Partition Management
    Have ideas to improve npm?Join in the discussion! »

    rasa

    0.2.0 • Public • Published

    rasa

    npm npm license npm downloads build status

    Dependency-less asar archive implementation

    Install via npm

    $ npm install --save rasa

    Differences

    Compared to electron/asar, rasa

    • Has no dependencies
    • Has no command line interface
    • Provides error handling for all methods

    TODO

    • Packing of files
    • API compatibility with asar

    Usage

    var rasa = require( 'rasa' )

    Listing an archive's contents

    var files = rasa.listPackage( 'test/data/pack.asar' )
    > [ 'archive.js', 'filesystem.js', 'rasa.js' ]

    Opening an archive

    var archive = new rasa.Archive()
    archive.open( filename, ( error ) => {
      // Do things...
      console.log( 'files', rasa.Archive.listFiles( archive.root ) )
      // Close the handle to the archive
      archive.close()
    })

    Reading a file

    archive.readFile( 'archive.js', function( error, buffer ) {
      // ...
    })

    Reading directories

    var ls = archive.readdir( '/' )

    Streaming a file from an archive

    archive.createReadStream( 'archive.js' )
      .pipe( process.stdout )

    Install

    npm i rasa

    DownloadsWeekly Downloads

    5

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    19.8 kB

    Total Files

    8

    Last publish

    Collaborators

    • avatar