{"id":18356252,"url":"https://github.com/rainbowatcher/toml-edit-js","last_synced_at":"2025-04-06T12:32:12.938Z","repository":{"id":251013037,"uuid":"834428988","full_name":"rainbowatcher/toml-edit-js","owner":"rainbowatcher","description":"brings toml-edit to the JavaScript world","archived":false,"fork":false,"pushed_at":"2025-02-26T13:41:32.000Z","size":1669,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T21:52:52.542Z","etag":null,"topics":["edit","toml","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/rainbowatcher.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-27T08:37:43.000Z","updated_at":"2025-02-26T13:41:35.000Z","dependencies_parsed_at":"2024-07-31T09:49:51.377Z","dependency_job_id":"7d18faa2-8324-48fa-bac2-8f259e376ebb","html_url":"https://github.com/rainbowatcher/toml-edit-js","commit_stats":null,"previous_names":["rainbowatcher/toml-edit-js"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainbowatcher%2Ftoml-edit-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainbowatcher%2Ftoml-edit-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainbowatcher%2Ftoml-edit-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainbowatcher%2Ftoml-edit-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rainbowatcher","download_url":"https://codeload.github.com/rainbowatcher/toml-edit-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247484449,"owners_count":20946388,"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":["edit","toml","wasm","webassembly"],"created_at":"2024-11-05T22:09:23.258Z","updated_at":"2025-04-06T12:32:12.266Z","avatar_url":"https://github.com/rainbowatcher.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Toml edit for JavaScript\n\nThis repo is built on top of the `toml-edit` crate. It brings `toml-edit` to the JavaScript world through WebAssembly.\n\n## Usage\n\n```sh\nnpm install @rainbowatcher/toml-edit-js\n```\n\n```js\nimport init, { edit, parse, stringify } from \"@rainbowatcher/toml-edit-js\"\n\nconst toml = `\n[package]\nrand = \"1\"\n\n[profile.release]\nstrip = \"symbols\"\nlto = true\ncodegen-units = 1\n`\n\nawait init({})\nconst parsed = parse(toml)\n/*\nthe const parsed will be as follow\n{\n    \"package\": {\n        \"rand\": \"1\"\n    },\n    \"profile\": {\n        \"release\": {\n            \"strip\": \"symbols\",\n            \"lto\": true,\n            \"codegen-units\": 1\n        }\n    }\n}\n*/\n\nconst edited = edit(toml, \"package.rand\", { version: \"1.0\" })\n/*\nthe const edited will be as follow\n\n[package]\nrand = { version = \"1.0\" }\n\n[profile.release]\nstrip = \"symbols\"\nlto = true\ncodegen-units = 1\n*/\n\nconst str = stringify(parsed)\n/* same as const toml */\n```\n\n## Options\n\nedit method can receive a options\n\n```ts\ntype IEditOptions = {\n    finalNewline: boolean\n}\n```\n\n# License\n\n[MIT](https://github.com/rainbowatcher/toml-edit-js/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainbowatcher%2Ftoml-edit-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frainbowatcher%2Ftoml-edit-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainbowatcher%2Ftoml-edit-js/lists"}