How to use the memorystream.createReadStream function in memorystream

To help you get started, we’ve selected a few memorystream examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozilla / thimble.mozilla.org / default / index.js View on Github external
_defaultProjects[title].forEach(function(file) {
    switch(dataType) {
    case TAR_STREAM:
      result.entry({ name: file.path }, file.buffer);
      break;
    case FILE_STREAM:
      result.push({
        path: file.path,
        stream: MemoryStream.createReadStream(file.buffer),
        size: file.buffer.length
      });
      break;
    case BUFFER:
    default:
      result.push(file);
      break;
    }
  });

memorystream

This is lightweight memory stream module for node.js.

MIT
Latest version published 10 years ago

Package Health Score

67 / 100
Full package analysis