{"id":18544727,"url":"https://github.com/131/sfdisk-parser","last_synced_at":"2025-06-19T17:33:36.369Z","repository":{"id":207846004,"uuid":"720247068","full_name":"131/sfdisk-parser","owner":"131","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-18T21:53:52.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-25T09:07:41.493Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/131.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-11-17T23:08:04.000Z","updated_at":"2023-11-17T23:10:23.000Z","dependencies_parsed_at":"2023-11-18T00:36:13.710Z","dependency_job_id":"1bc497a6-0eb8-4050-9c08-b4d1de5202df","html_url":"https://github.com/131/sfdisk-parser","commit_stats":null,"previous_names":["131/sfdisk-parser"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fsfdisk-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fsfdisk-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fsfdisk-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fsfdisk-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/131","download_url":"https://codeload.github.com/131/sfdisk-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254282736,"owners_count":22045128,"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-11-06T20:17:26.758Z","updated_at":"2025-05-15T05:34:15.173Z","avatar_url":"https://github.com/131.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/131/sfdisk-parser/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/131/sfdisk-parser/actions/workflows/test.yml)\n[![Coverage Status](https://coveralls.io/repos/github/131/sfdisk-parser/badge.svg?branch=master)](https://coveralls.io/github/131/sfdisk-parser?branch=master)\n[![Version](https://img.shields.io/npm/v/sfdisk-parser.svg)](https://www.npmjs.com/package/sfdisk-parser)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)\n[![Code style](https://img.shields.io/badge/code%2fstyle-ivs-green.svg)](https://www.npmjs.com/package/eslint-plugin-ivs)\n\n\n# Motivation \n\nThis package provide a simple parser/serializer of sfdisk dumps. \n\n# API\n## {metas, parts, toString} new SfdiskParser(sfdisk_dump_body);\n## parts[2][name]= \"System reserved somthing\";\n\n\n# Example usage\n\nI was in need of the following API\n\n```\nconst SfdiskParser = require('sfdisk-parser');\nconst somesfdiskdump_path = 'mysda.sf';\n\nlet sfstruct = new SfdiskParser(fs.readFileSync(somesfdiskdump_path, 'utf-8'));\n\n\nlet reserved = parsed.parts.pop(); //shift last part out of 4\n\nparsed.parts.splice(2, 0, reserved); //put it back as 3rd\n\ndelete parsed.metas['last-lba']; //allow write on shorter disk\n\nfs.writeFileSync(somesfdiskdump_path + \"_reordered\", sfstruct.toString());\n\n```\n\n# Credits\n* [131](https://github.com/131)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Fsfdisk-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F131%2Fsfdisk-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Fsfdisk-parser/lists"}