<commit_before>'use strict';

var read = require('read');
var promptly = module.exports;

function prompt(message, opts, fn) {
    // Setup read's options
    var readOpts = {
        prompt: message,
        input: opts.input || process.stdin,
        output: opts.output || process.stdout,
        silent: opts.silent
    };

    // Use readline question
    read(readOpts, function (err, data) {
        // Ignore the error attribute
        // It is set on SIGINT or if timeout reached (we are not using timeout)
        if (err) {
            return;
        }

        // Trim?
        if (opts.trim) {
            data = data.trim();
        }

        // Mandatory?
        if (opts['default'] == null && !data) {<commit_msg>Add a new option: replace<commit_after>'use strict';

var read = require('read');
var promptly = module.exports;

function prompt(message, opts, fn) {
    // Setup read's options
    var readOpts = {
        prompt: message,
        input: opts.input || process.stdin,
        output: opts.output || process.stdout,
        silent: opts.silent,
        replace: opts.replace || ''
    };

    // Use readline question
    read(readOpts, function (err, data) {
        // Ignore the error attribute
        // It is set on SIGINT or if timeout reached (we are not using timeout)
        if (err) {
            return;
        }

        // Trim?
        if (opts.trim) {
            data = data.trim();
        }

        // Mandatory?
        if (opts['default'] == null && !data) {
{'fraction_non_alphanumeric': 0.12409240924092409, 'fraction_numerical': 0.0, 'mean_word_length': 1.8178438661710037, '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': '1099103', 'n_tokens_mistral': 438, 'n_tokens_neox': 433, 'n_words': 136}