Tabnine Logo For Javascript
readable-stream
Code IndexAdd Tabnine to your IDE (free)

How to use readable-stream

Best JavaScript code snippets using readable-stream(Showing top 15 results out of 315)

origin: airtap/airtap

b.transform(function (file) {
  return new Transform({
   transform (buf, enc, next) {
    this.push(buf.toString('utf8').replace(/bar/g, 'baz'))
    next()
   }
  })
 })
origin: airtap/airtap

transform (buf, enc, next) {
   this.push(buf.toString('utf8').replace(/foo/g, 'bar'))
   next()
  }
origin: standard/snazzy

function CompactToStylishStream (opts) {
 if (!(this instanceof CompactToStylishStream)) {
  return new CompactToStylishStream(opts)
 }
 stream.Transform.call(this, opts)

 this.exitCode = 0
 this._buffer = []
}
origin: moleike/node-lwm2m

function DecodeStream(contentType, schema) {  
 this.contentType = contentType;
 this.schema = schema;
 Transform.call(this, { readableObjectMode: true });
}
origin: lmammino/streams-workshop

write (chunk, enc, done) {
  content += chunk.toString()
  done()
 }
origin: lmammino/streams-workshop

stringWritable.on('finish', () => console.log(content))
origin: Level/iterator-stream

function ReadStream (iterator, options) {
 if (!(this instanceof ReadStream)) return new ReadStream(iterator, options)
 options = options || {}
 Readable.call(this, extend(options, {
  objectMode: true
 }))
 this._iterator = iterator
 this._options = options
 this.on('end', this.destroy.bind(this, null, null))
}
origin: lmammino/streams-workshop

transform (date, enc, done) {
  this.push(date.getSeconds() + '\n')
  done()
 }
origin: AppGeo/cartodb

//var out = new PassThrough();
 this.request(sql).on('error', function (e) {
  out.emit('error', e);
 }).on('headers', function (e) {
  out.emit('headers', e);
 }).on('code', function (e) {
  if (e > 299) {
   var data = [];
   this.on('data', function (d) {
    data.push(d);
   }).on('finish', function () {
    var err = Buffer.concat(data).toString();
    debugrs(err);
    debugrs(sql);
    out.emit('error', new Error(err));
   });
  } else {
   this.pipe(out);
  }
  out.emit('code', e);
 });
origin: lmammino/streams-workshop

read () {
  this.push(Math.random() + '\n')
 }
origin: stream-utils/unpipe

function SlowOldStream () {
 stream.Stream.call(this)
}
origin: stream-utils/unpipe

function SlowReadStream () {
 stream.Readable.call(this)
}
origin: lmammino/streams-workshop

transform (chunk, enc, done) {
  this.push(JSON.stringify(chunk) + '\n')
  done()
 }
origin: stream-utils/unpipe

function SlowWriteStream () {
 stream.Writable.call(this)
}
origin: airtap/airtap

transform (buf, enc, next) {
   this.push(buf.toString('utf8').replace(/baz/g, 'qux'))
   next()
  }
readable-stream(npm)

JSDoc

Streams3, a user-land copy of the stream library from Node.js

Most used readable-stream functions

  • Writable.call
  • _Readable.Writable
  • push
  • Readable.call
  • Transform.call
  • next,
  • PassThrough.on,
  • Readable.pipe,
  • Readable.push,
  • Stream.call,
  • Transform.pipe,
  • Transform.push,
  • Writable.on,
  • _Readable.Readable,
  • _Readable.Stream,
  • _Readable.Transform

Popular in JavaScript

  • request
    Simplified HTTP request client.
  • q
    A library for promises (CommonJS/Promises/A,B,D)
  • yargs
    yargs the modern, pirate-themed, successor to optimist.
  • mongodb
    The official MongoDB driver for Node.js
  • minimatch
    a glob matcher in javascript
  • crypto
  • redis
    Redis client library
  • superagent
    elegant & feature rich browser / node HTTP with a fluent API
  • qs
    A querystring parser that supports nesting and arrays, with a depth limit
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now