<commit_before># Tmp

A simple temporary file and directory creator for node.js.

## How to install

npm install tmp

## Usage

var tmp = require('tmp');

    tmp.file(function _tempFileCreated(err, path, fd) {
        if (err) throw err;

        console.log("File: ", path);
        console.log("Filedescriptor: ", fd);
    });

    tmp.dir(function _tempDirCreated(err, path) {
        if (err) throw err;

        console.log("Dir: ", path);
    });

## More advanced usage

    tmp.file({ mode: 0644, prefix: 'prefix-', postfix: '.txt' }, function _tempFileCreated(err, path, fd) {
        if (err) throw err;<commit_msg>fixed the README<commit_after># Tmp

A simple temporary file and directory creator for node.js.

## How to install

npm install tmp

## Usage

    var tmp = require('tmp');

    tmp.file(function _tempFileCreated(err, path, fd) {
        if (err) throw err;

        console.log("File: ", path);
        console.log("Filedescriptor: ", fd);
    });

    tmp.dir(function _tempDirCreated(err, path) {
        if (err) throw err;

        console.log("Dir: ", path);
    });

## More advanced usage

    var tmp = require('tmp');

    tmp.file({ mode: 0644, prefix: 'prefix-', postfix: '.txt' }, function _tempFileCreated(err, path, fd) {
        if (err) throw err;
{'fraction_non_alphanumeric': 0.14573643410852713, 'fraction_numerical': 0.006201550387596899, 'mean_word_length': 2.8195266272189348, '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': '2305016', 'n_tokens_mistral': 427, 'n_tokens_neox': 405, 'n_words': 124}