<commit_before># Using GraphQL-Pouch as a Library

People may want to use GraphQL-Pouch as a library of their own NodeJS projects. GraphQL-Pouch supports this functionality.

To use GraphQL-Pouch as a library just do:

```javascript
const SERVICE_PORT = process.env.SERVICE_PORT || 3000;
const ENVIRONMENT = 'default';
const ENABLE_RELAY = true;
const CUSTOM_FUNCTIONS = {
  settingByKey: (ctx, input) => {
    //Fake output result to demonstrate custom functions.
    ctx.success({
      id: 'A',
      rev: 'B',
      key: input.key,
    });

  }<commit_msg>Link to library example<commit_after># Using GraphQL-Pouch as a Library

People may want to use GraphQL-Pouch as a library of their own NodeJS projects. GraphQL-Pouch supports this functionality.

To use GraphQL-Pouch as a library just do or fork [graphql-pouch-as-library](https://github.com/MikeBild/graphql-pouch-as-library):

```javascript
const SERVICE_PORT = process.env.SERVICE_PORT || 3000;
const ENVIRONMENT = 'default';
const ENABLE_RELAY = true;
const CUSTOM_FUNCTIONS = {
  settingByKey: (ctx, input) => {
    //Fake output result to demonstrate custom functions.
    ctx.success({
      id: 'A',
      rev: 'B',
      key: input.key,
    });

  }
{'fraction_non_alphanumeric': 0.10500410172272355, 'fraction_numerical': 0.006562756357670222, 'mean_word_length': 3.6564885496183206, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 1, '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': '6908699', 'n_tokens_mistral': 397, 'n_tokens_neox': 386, 'n_words': 130}