<commit_before># EircodeJS

## Methods

Using the static `Eircode.parse` method we can parse some input:

```javascript
var Eircode = require('eircode-js');
var result = Eircode.parse('A65R2GF');
```

This will return a [ParseResult](src/parse-result.js) object.

With `ParseResult` you can check if the Eircode is valid and access its parts:

```javascript
if (result.hasEircode()) {
    console.log('Routing Key = ', result.routingKey());
    console.log('Unique Identifier = ', result.uniqueIdentifier());
}
```

You can get a plain object containing all the parsed properties using `toJSON`:

```javascript
console.log(result.toJSON());
```

This will output something like:
<commit_msg>Add a brief summary of the project and its goals.<commit_after># EircodeJS

EircodeJS is a JavaScript library for parsing and validating Eircodes (Irish postcodes).

EircodeJS has the following goals:

<dl>
  <dt>Correctness</dt>
  <dd>EircodeJS will never reject a valid Eircode and should never accept invalid Eircodes</dd>

  <dt>Usefulness</dt>
  <dd>EircodeJS will emit detailed error messages for the user and for the developer</dd>

  <dt>Performance</dt>
  <dd>EircodeJS will be fast and have no pathologically slow edge cases</dd>
</dl>

## Methods

Using the static `Eircode.parse` method we can parse some input:

```javascript
var Eircode = require('eircode-js');
var result = Eircode.parse('A65R2GF');
```

This will return a [ParseResult](src/parse-result.js) object.

With `ParseResult` you can check if the Eircode is valid and access its parts:

```javascript
if (result.hasEircode()) {
    console.log('Routing Key = ', result.routingKey());
    console.log('Unique Identifier = ', result.uniqueIdentifier());
}
```

You can get a plain object containing all the parsed properties using `toJSON`:

```javascript
console.log(result.toJSON());
```

This will output something like:

{'fraction_non_alphanumeric': 0.11964002117522499, 'fraction_numerical': 0.0031762837480148226, 'mean_word_length': 4.924764890282131, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '1101962', 'n_tokens_mistral': 595, 'n_tokens_neox': 574, 'n_words': 206}