How to use the oboe.drop function in oboe

To help you get started, we’ve selected a few oboe 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 juttle / juttle / lib / adapters / parsers / json.js View on Github external
self.totalParsed++;

                if (self.totalParsed > self.stopAt) {
                    emit(buffer);
                    buffer=[];
                    this.abort(); // tell oboe to shut things down
                    this.emit('end');
                } else {
                    buffer.push(point);
                    if (buffer.length >= self.limit) {
                        emit(buffer);
                        buffer = [];
                    }
                }

                return oboe.drop;
            })
            .on('end', function(){
github nusmodifications / nusmods / scrapers / nus-v2 / src / services / nus-api.ts View on Github external
.node('data[*]', (lesson: TimetableLesson) => {
          // Consume and discard each lesson
          lessonConsumer(lesson);
          return oboe.drop;
        })
        .done((data) => {
github elastic / kibana / x-pack / legacy / plugins / file_upload / public / util / pattern_reader.js View on Github external
'features.*': feature => {
        if (!feature.geometry || !feature.geometry.type) {
          // Only add this error once
          // TODO: Give feedback on which features failed
          if (!this._errors.length) {
            this._errors.push(
              new Error(
                i18n.translate('xpack.fileUpload.patternReader.featuresOmitted', {
                  defaultMessage: 'Some features without geometry omitted',
                })
              )
            );
          }
          return oboe.drop;
        }
        return featurePatternCallback(feature);
      },
      // Handle single feature files
github muoncore / muon-node / testing / convertJSON.js View on Github external
.on('done', function(event){
        //console.log("---------- event: ---------------------------------------------");
        //console.dir(event);
        return oboe.drop;
     })
     .on('fail', function(e){
github tsouza / yajs / src / bench / bench-oboe.ts View on Github external
on('node', process.env.JSON_PATH, () => {
       meter.mark();
       return oboe.drop;
    }).
    fail((err) => console.error(err.stack)).
github looker / actions / src / hub / action_request.ts View on Github external
return function(this: oboe.Oboe, node: any) {
      try {
        callback(node)
        return oboe.drop
      } catch (e) {
        winston.info(`safeOboe callback produced an error, aborting stream`, logInfo)
        this.abort()
        stream.destroy()
        reject(e)
      }
    }
  }
github alfonsogoberjr / knearest / machine.js View on Github external
.node(pattern, (item) => {
            this.transform(item)
              .then(this.setNode)
              .catch(reject);
            return oboe.drop;
          })
          .done(resolve);
github FirebaseExtended / firebase-streaming-import / import.js View on Github external
.node('*', function(jsonLeaf, path) {
    var nodePath = firebaseRootRef;
    for (i = 0; i < path.length; i++) { 
        nodePath = nodePath.child(path[i]);
    }
    nodePath.update(jsonLeaf);
    return oboe.drop;
  })
  .done(function(things) {
github FH-Potsdam / shifted-maps / app / client / actions / storyline.js View on Github external
.node('stay', function(stay) {
        stay = new Stay(stay);
        stays.push(stay);

        debounceDispatch(sendStoryline());

        return oboe.drop;
      })
      .node('trip', function(trip) {
github FH-Potsdam / shifted-maps / app / server / services / moves / segment-reader.js View on Github external
.node('segments.*', function(segment) {
      reader.push(segment);

      return oboe.drop;
    })
    .done(function() {

oboe

Oboe.js reads json, giving you the objects as they are found without waiting for the stream to finish

BSD
Latest version published 6 years ago

Package Health Score

62 / 100
Full package analysis

Popular oboe functions