{"id":43223740,"url":"https://github.com/interledger-deprecated/five-bells-shared","last_synced_at":"2026-02-01T09:17:49.426Z","repository":{"id":28966639,"uuid":"32492933","full_name":"interledger-deprecated/five-bells-shared","owner":"interledger-deprecated","description":"Common elements that are shared between Five Bells components","archived":false,"fork":false,"pushed_at":"2018-01-09T16:14:16.000Z","size":1234,"stargazers_count":4,"open_issues_count":8,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-03T23:12:11.240Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/interledger-deprecated.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-19T00:58:59.000Z","updated_at":"2018-10-29T19:50:16.000Z","dependencies_parsed_at":"2022-07-31T22:07:54.850Z","dependency_job_id":null,"html_url":"https://github.com/interledger-deprecated/five-bells-shared","commit_stats":null,"previous_names":["interledgerjs/five-bells-shared","interledger/five-bells-shared"],"tags_count":112,"template":false,"template_full_name":null,"purl":"pkg:github/interledger-deprecated/five-bells-shared","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Ffive-bells-shared","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Ffive-bells-shared/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Ffive-bells-shared/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Ffive-bells-shared/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interledger-deprecated","download_url":"https://codeload.github.com/interledger-deprecated/five-bells-shared/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Ffive-bells-shared/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28974588,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T08:16:14.655Z","status":"ssl_error","status_checked_at":"2026-02-01T08:06:51.373Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-01T09:17:48.575Z","updated_at":"2026-02-01T09:17:49.422Z","avatar_url":"https://github.com/interledger-deprecated.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Five Bells Shared [![npm][npm-image]][npm-url] [![circle][circle-image]][circle-url] [![codecov][codecov-image]][codecov-url]\n\n[npm-image]: https://img.shields.io/npm/v/five-bells-shared.svg?style=flat\n[npm-url]: https://npmjs.org/package/five-bells-shared\n[circle-image]: https://circleci.com/gh/interledgerjs/five-bells-shared.svg?style=shield\n[circle-url]: https://circleci.com/gh/interledgerjs/five-bells-shared\n[codecov-image]: https://codecov.io/gh/interledgerjs/five-bells-shared/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/interledgerjs/five-bells-shared\n\n\u003e Shared module among Five Bells Node.js apps\n\n## Installation\n\n``` sh\nnpm install --save five-bells-shared\n```\n\n## Schema Validator\n\nThis module contains a schema validator.\n\n## Log Service\n\nThe log service uses [mag](https://github.com/mahnunchik/mag) and a custom formatter to generate pretty logs like this:\n\n![Example log output](docs/assets/log-example.png)\n\n### Usage\n\nSet up the logger somewhere in your top-level app:\n\n``` js\nconst hub = require('mag-hub')\nconst mag = require('mag')\nconst log = require('five-bells-shared/lib/log')\n\nmodule.exports = log(mag, hub)\n```\n\nThen use it from anywhere using `require('mag')`:\n\n``` js\nconst log = require('mag')('transfers')\n\nlog.debug('very boring information')\nlog.info('somewhat useful information')\nlog.warn('sort of important information')\nlog.error('super-important information')\n```\n\n### Caveat\n\nIf you're using `mag` in a module which is `npm link`ed, it will receive its own instance of `mag` and messages will not be formatted correctly. To solve this problem, you can install the `mag` module globally and link it in all of your local modules:\n\n``` sh\nsudo npm install -g mag\nnpm link mag # in each module directory\n```\n\n## Log Test Helper\n\nThe log helper is useful in tests to mute the log output of tests and print it if the test fails.\n\n### Usage\n\n``` js\nconst logHelper = require('five-bells-shared/testHelpers/log');\n\ndescribe('Transfers', function () {\n  logHelper();\n\n  // ...\n});\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledger-deprecated%2Ffive-bells-shared","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterledger-deprecated%2Ffive-bells-shared","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledger-deprecated%2Ffive-bells-shared/lists"}