<commit_before>/*
  Send the next tweet in a queue and queue up the following one
  See README.md for usage information
*/

//'use strict';

var request = require('request-promise');

// tweet the queued tweet and then queue up the next one
module.exports = function(ctx, cb) {

  // response handler
  function callback(err, nextTweet) {
    // return success or failure
    if (err) {
      return cb(err);
    } else {
      if (nextTweet) {
        return cb(null, 'DONE - next tweet: ' + JSON.stringify(nextTweet));
      } else {
        return cb(null, 'DONE - no next tweet');
      }
    }
  }

  // get next tweet from storage
  ctx.storage.get(function(error, tweet) {
    // if there is no tweet queued, error out<commit_msg>putting strict mode back on<commit_after>/*
  Send the next tweet in a queue and queue up the following one
  See README.md for usage information
*/

'use strict';

var request = require('request-promise');

// tweet the queued tweet and then queue up the next one
module.exports = function(ctx, cb) {

  // response handler
  function callback(err, nextTweet) {
    // return success or failure
    if (err) {
      return cb(err);
    } else {
      if (nextTweet) {
        return cb(null, 'DONE - next tweet: ' + JSON.stringify(nextTweet));
      } else {
        return cb(null, 'DONE - no next tweet');
      }
    }
  }

  // get next tweet from storage
  ctx.storage.get(function(error, tweet) {
    // if there is no tweet queued, error out
{'fraction_non_alphanumeric': 0.11036339165545088, 'fraction_numerical': 0.0, 'mean_word_length': 2.5831325301204817, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4948208', 'n_tokens_mistral': 471, 'n_tokens_neox': 450, 'n_words': 167}