<commit_before># eventstore-node
A port of the EventStore .Net ClientAPI to Node.js

## Dependencies

- Node.js >= 0.12
- protobufjs module
- uuid module

## Status

Unstable

Incomplete/missing features:

- Ssl connection: not implemented yet
- Typed errors: currently most errors are direct instance of Error, which is not practical for error handling
- Performance: there's still some while loop in the code that could be problematic with node.js
- Tests: tests are only covering happy path scenarios for now
- Cluster connection: not implemented yet
- Set system settings: not implemented yet
- NPM package: no package released yet, I will release one when code is stable

## Porting .Net Task to Node.js

I used Promise to replace .Net Task, so when executing an async command, i.e. appendToStream you'll have to wait for result/error like this:

    connection
      .appendToStream('myStream', client.expectedVersion.any, events, userCredentials)
      .then(function(result) {
        //Do something with the WriteResult here
      })
      .catch(function(err) {
        //Handle error here
      });

## Running the tests
You will need:

- dependencies (`npm install`)
- nodeunit (`npm install -g nodeunit`)
- an instance of EventStore running on localhost:1113 (https://geteventstore.com/downloads/)

To execute the tests suites simply run test with npm

    npm test

## License

This is a port, original code is released under the EventStore license and can be found at https://github.com/eventstore/eventstore.
Ported code is released under the MIT license, see https://github.com/nicdex/eventstore-node/blob/master/LICENSE<commit_msg>Updating README<commit_after># eventstore-node
A port of the EventStore .Net ClientAPI to Node.js

## Dependencies

- Node.js >= 0.12
- protobufjs module
- uuid module

## Status

Unstable

### Missing features:

- Ssl connection
- Cluster connection
- Set system settings

### Incomplete

- Typed errors: currently most errors are direct instance of Error, which is not practical for error handling
- Performance: there's still some while loop in the code that could be problematic with node.js
- Tests: tests are only covering happy path scenarios for now
- NPM package: no package released yet, I will release one when code is stable

## Porting .Net Task to Node.js

I used Promise to replace .Net Task, so when executing an async command, i.e. appendToStream you'll have to wait for result/error like this:

    connection
      .appendToStream('myStream', client.expectedVersion.any, events, userCredentials)
      .then(function(result) {
        //Do something with the WriteResult here
      })
      .catch(function(err) {
        //Handle error here
      });

## Running the tests
You will need:

- dependencies (`npm install`)
- nodeunit (`npm install -g nodeunit`)
- an instance of EventStore running on localhost:1113 (https://geteventstore.com/downloads/)

To execute the tests suites simply run test with npm

    npm test

## License

This is a port, original code is released under the EventStore license and can be found at https://github.com/eventstore/eventstore.

Ported code is released under the MIT license, see https://github.com/nicdex/eventstore-node/blob/master/LICENSE
{'fraction_non_alphanumeric': 0.0769704433497537, 'fraction_numerical': 0.004310344827586207, 'mean_word_length': 3.6815561959654177, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, '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': '3448237', 'n_tokens_mistral': 892, 'n_tokens_neox': 854, 'n_words': 394}