<commit_before>const util = require('util')
const streampng = require('streampng');

const KEYWORD = 'openbadges';

module.exports = {
  bake: bake,
  extract: extract,
  keyword: KEYWORD,
  createChunk: createChunk
}

function bake(options, callback) {
  const buffer = options.image;
  var data = options.url || options.data;

  if (!data)
    return callback(new Error('must pass a `data` or `url` option'));<commit_msg>Flexibility.<commit_after>const util = require('util')
const streampng = require('streampng');

const KEYWORD = 'openbadges';

module.exports = {
  bake: bake,
  extract: extract,
  keyword: KEYWORD,
  createChunk: createChunk
}

function bake(options, callback) {
  const buffer = options.image;
  var data = options.url || options.data || options.assertion;

  if (!data)
    return callback(new Error('must pass a `data` or `url` option'));
{'fraction_non_alphanumeric': 0.13394919168591224, 'fraction_numerical': 0.0, 'mean_word_length': 4.666666666666667, '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': '2023004', 'n_tokens_mistral': 278, 'n_tokens_neox': 270, 'n_words': 78}