<commit_before># EditorConfig JavaScript Core

The EditorConfig JavaScript core will provide the same functionality as the
[EditorConfig C Core][] and [EditorConfig Python Core][].

[EditorConfig C Core]: https://github.com/editorconfig/editorconfig-core
[EditorConfig Python Core]: https://github.com/editorconfig/editorconfig-core-py

# Installation

You need [node][] to use this package.

To install this package (system-wide):

    sudo npm install -g .

# Usage

Usage as a Node library:

    $ node
    > var editorconfig = require('./editorconfig');
    undefined
    > editorconfig.parse('/home/zoidberg/humans/anatomy.md');
    { charset: 'utf-8',
      insert_final_newline: 'true',
      end_of_line: 'lf',
      tab_width: '8',
      trim_trailing_whitespace: 'sometimes' }


Usage as a command line tool:

    $ editorconfig /home/zoidberg/humans/anatomy.md
    charset=utf-8
    insert_final_newline=true
    end_of_line=lf
    tab_width=8
    trim_trailing_whitespace=sometimes

# Development

To install dependencies for this package run this in the package directory:

    npm install

To test the command line interface:

    ./bin/editorconfig <filepath>

[node]: http://nodejs.org/<commit_msg>Add testing instructions to README<commit_after># EditorConfig JavaScript Core

The EditorConfig JavaScript core will provide the same functionality as the
[EditorConfig C Core][] and [EditorConfig Python Core][].

[EditorConfig C Core]: https://github.com/editorconfig/editorconfig-core
[EditorConfig Python Core]: https://github.com/editorconfig/editorconfig-core-py

# Installation

You need [node][] to use this package.

To install this package (system-wide):

    sudo npm install -g .

# Usage

Usage as a Node library:

    $ node
    > var editorconfig = require('./editorconfig');
    undefined
    > editorconfig.parse('/home/zoidberg/humans/anatomy.md');
    { charset: 'utf-8',
      insert_final_newline: 'true',
      end_of_line: 'lf',
      tab_width: '8',
      trim_trailing_whitespace: 'sometimes' }


Usage as a command line tool:

    $ editorconfig /home/zoidberg/humans/anatomy.md
    charset=utf-8
    insert_final_newline=true
    end_of_line=lf
    tab_width=8
    trim_trailing_whitespace=sometimes

# Development

To install dependencies for this package run this in the package directory:

    npm install

To test the command line interface:

    ./bin/editorconfig <filepath>

[node]: http://nodejs.org/

# Testing

[CMake][] must be installed to run the tests.

To run the tests:

    cmake .
    ctest .

To run the tests with increased verbosity (for debugging test failures):

    ctest -VV --output-on-failure .

[cmake]: http://www.cmake.org
{'fraction_non_alphanumeric': 0.09951726698848867, 'fraction_numerical': 0.0029706646862235424, 'mean_word_length': 3.6288659793814433, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1103066', 'n_tokens_mistral': 848, 'n_tokens_neox': 806, 'n_words': 248}