<commit_before>/*
 * grunt-basex
 * https://github.com/alxarch/grunt-basex
 *
 * Copyright (c) 2013 <NAME>
 * Licensed under the MIT license.
 */

'use strict';

module.exports = function(grunt) {
    
    var basex = require('basex-standalone')
      , pkg = grunt.file.readJSON('package.json')
      , crypto = require('crypto')
      , _ = require('lodash')
      , __ = function(){
            return _(arguments).toArray().flatten().compact()
        }

    grunt.registerMultiTask('basex', pkg.description, function(){
        var done = this.async()
          , opt = this.options()
          , omit = ['bind', 'run', 'xquery', 'commands', 'input', 'output']
          , b = basex.partial(_.omit(opt, omit))
          , job = new basex.Job()
          , db = opt.db || crypto.randomBytes(32).toString('hex')

        job.bind('db', db)
<commit_msg>wraps random name generator in `uuid()` function<commit_after>/*
 * grunt-basex
 * https://github.com/alxarch/grunt-basex
 *
 * Copyright (c) 2013 <NAME>
 * Licensed under the MIT license.
 */

'use strict';

module.exports = function(grunt) {
    
    var basex = require('basex-standalone')
      , pkg = grunt.file.readJSON('package.json')
      , crypto = require('crypto')
      , uuid = function(){
            return crypto.randomBytes(32).toString('hex')
        }
      , _ = require('lodash')
      , __ = function(){
            return _(arguments).toArray().flatten().compact()
        }

    grunt.registerMultiTask('basex', pkg.description, function(){
        var done = this.async()
          , opt = this.options()
          , omit = ['bind', 'run', 'xquery', 'commands', 'input', 'output']
          , b = basex.partial(_.omit(opt, omit))
          , job = new basex.Job()
          , db = opt.db || uuid()

        job.bind('db', db)

{'fraction_non_alphanumeric': 0.17256637168141592, 'fraction_numerical': 0.00663716814159292, 'mean_word_length': 2.3876404494382024, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '1015043', 'n_tokens_mistral': 590, 'n_tokens_neox': 563, 'n_words': 116}