<commit_before>'use strict';

let Promise = require('bluebird');
let Glue = Promise.promisifyAll(require('glue'));

function digs(config, options, done) {
  options = options || {};
  options.preConnections = function appendCoAPConnection(server, next) {
    config.connections.push(require('hapi-coap-listener')(server));
    next();
  };

  return Glue.composeAsync(config, options)
    .then(function start(server) {
      server.log('digs', 'Digs bootstrapped');
      let t = new Date().getTime();
      return Promise.promisify(server.start, server)()
        .tap(function report() {
          let delta = new Date().getTime() - t;
          server.log('digs', `Digs started in ${delta}ms`);
        });
    }).nodeify(done);
}

module.exports = digs;
<commit_msg>format tweak<commit_after>'use strict';

let Promise = require('bluebird');
let Glue = Promise.promisifyAll(require('glue'));

function digs(config, options, done) {
  options = options || {};
  options.preConnections = function appendCoAPConnection(server, next) {
    config.connections.push(require('hapi-coap-listener')(server));
    next();
  };

  return Glue.composeAsync(config, options)
    .then(function start(server) {
      server.log('digs', 'Digs bootstrapped');
      let t = new Date().getTime();
      return Promise.promisify(server.start, server)()
        .tap(function report() {
          let delta = new Date().getTime() - t;
          server.log('digs', `Digs started in ${delta}ms`);
        });
    })
    .nodeify(done);
}

module.exports = digs;

{'fraction_non_alphanumeric': 0.1630012936610608, 'fraction_numerical': 0.0, 'mean_word_length': 3.536656891495601, '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': '5164924', 'n_tokens_mistral': 488, 'n_tokens_neox': 482, 'n_words': 101}