{"id":20000183,"url":"https://github.com/andstor/smart-contract-slicer","last_synced_at":"2026-07-16T22:32:32.882Z","repository":{"id":57681379,"uuid":"472044518","full_name":"andstor/smart-contract-slicer","owner":"andstor","description":":scissors: Utility for slicing contracts into pieces.","archived":false,"fork":false,"pushed_at":"2022-03-21T17:30:47.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T23:39:21.487Z","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/andstor.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":"2022-03-20T16:58:22.000Z","updated_at":"2022-03-21T17:30:50.000Z","dependencies_parsed_at":"2022-09-15T05:52:13.042Z","dependency_job_id":null,"html_url":"https://github.com/andstor/smart-contract-slicer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andstor/smart-contract-slicer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andstor%2Fsmart-contract-slicer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andstor%2Fsmart-contract-slicer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andstor%2Fsmart-contract-slicer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andstor%2Fsmart-contract-slicer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andstor","download_url":"https://codeload.github.com/andstor/smart-contract-slicer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andstor%2Fsmart-contract-slicer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279040121,"owners_count":26090741,"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","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-11-13T05:14:00.439Z","updated_at":"2025-10-15T10:42:32.864Z","avatar_url":"https://github.com/andstor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# smart-contract-slicer\n\n\u003e :scissors: Utility for slicing contracts into pieces.\n\n\n## Install\n```\n$ npm install @andstor/smart-contract-slicer\n```\n\n## Usage\n```js\nimport { Slicer } from '@andstor/smart-contract-slicer';\n\nconst input = `\ncontract test {\n    uint256 a;\n    function f1() {\n        return 1;\n    }\n    function f2() {\n        return 2;\n    }\n}\n`\nlet slices = slicer.sliceAtNode(\"FunctionDefinition\", 1, \"firstLine\")\nconsole.log(slices)[0]\n/*\n    contract test {\n        uint256 a;\n    function f1() {\n*/\n```\n## License\n\nCopyright © 2022 [André Storhaug](https://github.com/andstor)\n\nsmart-contract-slicer is licensed under the [MIT License](https://github.com/andstor/smart-contract-slicer/blob/master/LICENSE).  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandstor%2Fsmart-contract-slicer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandstor%2Fsmart-contract-slicer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandstor%2Fsmart-contract-slicer/lists"}