{"id":17159160,"url":"https://github.com/scull7/bs-awesomize","last_synced_at":"2025-04-10T17:06:40.253Z","repository":{"id":30975097,"uuid":"126546354","full_name":"scull7/bs-awesomize","owner":"scull7","description":"A ReasonML implementation of the Awesomize library for data validation / scrubbing","archived":false,"fork":false,"pushed_at":"2023-01-06T01:57:31.000Z","size":2009,"stargazers_count":1,"open_issues_count":10,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T14:45:36.450Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Reason","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scull7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-23T22:51:34.000Z","updated_at":"2022-06-06T05:43:46.000Z","dependencies_parsed_at":"2023-01-14T18:05:02.790Z","dependency_job_id":null,"html_url":"https://github.com/scull7/bs-awesomize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scull7%2Fbs-awesomize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scull7%2Fbs-awesomize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scull7%2Fbs-awesomize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scull7%2Fbs-awesomize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scull7","download_url":"https://codeload.github.com/scull7/bs-awesomize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248260535,"owners_count":21074211,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-10-14T22:13:30.113Z","updated_at":"2025-04-10T17:06:40.233Z","avatar_url":"https://github.com/scull7.png","language":"Reason","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://www.travis-ci.org/scull7/bs-awesomize.svg?branch=master)](https://www.travis-ci.org/scull7/bs-awesomize)\n[![Coverage Status](https://coveralls.io/repos/github/scull7/bs-awesomize/badge.svg?branch=master)](https://coveralls.io/github/scull7/bs-awesomize?branch=master)\n\n# bs-awesomize\nA ReasonML implementation of the Awesomize library for data validation / scrubbing\n\n# Why?\nWe use Awesomize to ensure that data which comes into our system\nfits the proper shape and is within expected constraints.  There are several\nother libraries which aim to handle this, however, translating them to\nReasonML proved problematic.  Also, the Awesomize library is asynchronous by\ndefault which allows much greater flexibility in validation / scrubbing code.\n\n# Status\n\nThis library can be considered production ready.\n\n# Installation\n\nInside of a BuckleScript project:\n```sh\nyarn add bs-awesomize\n```\n\nThen add `bs-awesomize` to your `bs-dependencies` in your `bsconfig.json`\n```json\n{\n  \"bs-dependencies\": [ \"bs-awesomize\" ]\n}\n```\n\n# Usage\n\nIn order to use awesomize you will want to provide a \"schema\" which\nconsists of a map of `fields` to `field definitions`.\n\n## Field definition\n```reason\ntype maybe = option(Js.Json.t);\ntype jsonMap = Belt.Map.String.t(maybe);\n\ntype definition = {\n  read: Js.Dict.t(Js.Json.t) =\u003e Js.Promise.t(maybe),\n  sanitize: option((maybe, jsonMap) =\u003e Js.Promise.t(maybe)),\n  validate: list((maybe, jsonMap) =\u003e Js.Promise.t(option(string))),\n  normalize: option((maybe, jsonMap) =\u003e Js.Promise.t(maybe)),\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscull7%2Fbs-awesomize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscull7%2Fbs-awesomize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscull7%2Fbs-awesomize/lists"}