<commit_before>var N = require('libnested')

var isModule = require('./is')
var apply = require('./apply')

module.exports = function combine () {
  var modules = flattenNested(arguments)

  throwIfMissingDeps(modules)

  var api = {}

  eachModule(modules, function (module, key) {
    var deps = buildDeps(module.needs, api)
    var exported = module.create(deps)

    if (!exported) { throw new Error('export declared but not returned for', key) }
    addExportsToApi(exported, api, module)
  })

  if (isEmpty(api)) {
    throw new Error('could not resolve any modules')
  }

  return api
}

function isString (s) {
  return typeof s === 'string'
}

function isEmpty (e) {
  for (var k in e) return false
  return true
}

function isFunction (f) {
  return typeof f === 'function'
}

function isObject (o) {
  return o && typeof o === 'object'
}

function append (obj, path, value) {
  var a = N.get(obj, path)
  if (!a) N.set(obj, path, a = [])
  a.push(value)
}<commit_msg>Standard.<commit_after>var N = require('libnested')

var isModule = require('./is')
var apply = require('./apply')

module.exports = function combine () {
  var modules = flattenNested(arguments)

  throwIfMissingDeps(modules)

  var api = {}

  eachModule(modules, function (module, key) {
    var deps = buildDeps(module.needs, api)
    var exported = module.create(deps)

    if (!exported) { throw new Error('export declared but not returned for', key) }
    addExportsToApi(exported, api, module)
  })

  if (isEmpty(api)) {
    throw new Error('could not resolve any modules')
  }

  return api
}

function isString (s) {
  return typeof s === 'string'
}

function isEmpty (e) {
  for (var k in e) return false
  return true
}

function isObject (o) {
  return o && typeof o === 'object'
}

function append (obj, path, value) {
  var a = N.get(obj, path)
  if (!a) N.set(obj, path, a = [])
  a.push(value)
}
{'fraction_non_alphanumeric': 0.14059196617336153, 'fraction_numerical': 0.0, 'mean_word_length': 3.583535108958838, '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': '429555', 'n_tokens_mistral': 647, 'n_tokens_neox': 629, 'n_words': 199}