{"id":21297676,"url":"https://github.com/reasonml-old/refmt-js","last_synced_at":"2025-06-23T18:35:46.958Z","repository":{"id":57352149,"uuid":"101234180","full_name":"reasonml-old/refmt-js","owner":"reasonml-old","description":"refmt packaged as a JS library","archived":false,"fork":false,"pushed_at":"2018-03-13T00:10:53.000Z","size":4331,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-26T03:11:07.565Z","etag":null,"topics":["reasonml","refmt"],"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/reasonml-old.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":"2017-08-23T23:44:19.000Z","updated_at":"2024-11-05T00:45:22.000Z","dependencies_parsed_at":"2022-09-19T01:41:34.220Z","dependency_job_id":null,"html_url":"https://github.com/reasonml-old/refmt-js","commit_stats":null,"previous_names":["reasonml-community/refmt-js"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reasonml-old/refmt-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reasonml-old%2Frefmt-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reasonml-old%2Frefmt-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reasonml-old%2Frefmt-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reasonml-old%2Frefmt-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reasonml-old","download_url":"https://codeload.github.com/reasonml-old/refmt-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reasonml-old%2Frefmt-js/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261534486,"owners_count":23173411,"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":["reasonml","refmt"],"created_at":"2024-11-21T14:40:06.284Z","updated_at":"2025-06-23T18:35:46.923Z","avatar_url":"https://github.com/reasonml-old.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deprecated\n\nReason now comes with a `refmt.js`! See https://github.com/facebook/reason/tree/master#installation-for-programmatic-usage\n\n**======================== Old README**\n\n## Installation\n\n```\nnpm i refmt\n```\n\n## Usage\n\n```js\nconst refmt = require('refmt')\n\nconst myReasonMLCode = fs.readFileSync('file.re')\nconst formattedCode = refmt(myReasonMLCode)\n```\n\n## API\n\n#### `refmt(source: string, sourceLang: string?, sourceType: string?, targetLang: string?): string`\n\nThe `refmt` function will output styled ReasonML or OCaml source code. The only required param is\n`source`, the input source code. `sourceLang` specifies the input language, defaulted to Reason.\nSpecify `'RE'` for Reason, or `'ML'` for OCaml input. `sourceType` specifies the source code type,\neither `'implementation'` or `'interface'`, defaults to implementation. `targetLang` specifies the\noutput language, `'RE'` for Reason, or `'ML'` for OCaml, defaults to Reason.\n\n## Source Maps\n\nThe distibution also includes a sourcemap for the compiled JS. To enable Node to use the provided source\nmap, please use [`source-map-support`](https://github.com/evanw/node-source-map-support).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freasonml-old%2Frefmt-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freasonml-old%2Frefmt-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freasonml-old%2Frefmt-js/lists"}