{"_id":"@andstor/smart-contract-slicer","_rev":"1-21fdb8ae8ccfeca4857c1297a81d8568","name":"@andstor/smart-contract-slicer","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@andstor/smart-contract-slicer","version":"1.0.0","description":"Utility for slicing contracts into pieces.","main":"index.js","type":"module","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/andstor/smart-contract-slicer.git"},"author":{"name":"André Storhaug","email":"andr3.storhaug@gmail.com","url":"https://github.com/andstor"},"license":"MIT","bugs":{"url":"https://github.com/andstor/smart-contract-slicer/issues"},"homepage":"https://github.com/andstor/smart-contract-slicer#readme","dependencies":{"@solidity-parser/parser":"^0.14.1","i":"^0.3.7","npm":"^8.5.5"},"gitHead":"d27f4ee666d2422ac92481ba891e171017e58631","_id":"@andstor/smart-contract-slicer@1.0.0","_nodeVersion":"16.13.1","_npmVersion":"8.3.1","dist":{"integrity":"sha512-sHVNt7hWb2jvik7imPXPkbbdfeCHyxPsUYlgFzjC3aL3vdSqglMD+o4RsMxfw27hhxVS+IAziy6OYhlKV+fRAQ==","shasum":"75e74eae9d0029440e5f11051c46ce7bcbae75cd","tarball":"https://registry.npmjs.org/@andstor/smart-contract-slicer/-/smart-contract-slicer-1.0.0.tgz","fileCount":4,"unpackedSize":6268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOLZ8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpg8A/8DmUXhOZKdtGU0snqdfQpDFb+fZn40X3fGpWa1ohDlV+xFNtC\r\nqcwP8iUIKuliUbULCzn9EE7jYTQzqxrkTV9rTRZhoP6bZ+pZodou25TX0I38\r\nUUYiosiR2k+TzpOMAHDWWiGyNGvW7KihtiozdXeSu4nZ0snHIDZw0KibF7bA\r\nxvQ+Bbd2h50otIdci6GtVuMj9WijaPfe/kzyGzdN5GwbwyjuYZbG5jZN+nxu\r\nG1PqZjyr6aACx+Sw21CO3CTObsMauLQyHZL9MiYIa8/XHhfkignvARu6/S2w\r\n32QkSHz4afypAC8YTFt59NZiDWmwGwZhMSCycw6D8xdKZYzhD7ISAxUDLA9s\r\nAaNXWk+nPeIbiPMtlY3GQzfH+YPJMsjEcCfe9ABBA0OaZ0J/C9okDpds6X0B\r\nwIMfMGULjClSFLnkLsfFdDnXfr5g0IHJt99xsAbtyCMYipqb57tjjyvBdBU7\r\nsUVLWdBUs3JzFdtKW7cq3RSbXbY1qlb4yyS1Ns/p4rWODdMuqgrbOPSh1iZm\r\npViiiH6anlcTz+YZhEJsYDyClQwDhVeirftoRbU3gN9yu0aZBWqckuCd+fn1\r\nKAB7RFfnOk6dCHciepy7hfz/JRYDqqOt4l+QwkM8pSMzKUxiZRYEiAoaaCO1\r\nQdnHRcuZ/VtzA56ccAsje3x8ObC4MRlIcoU=\r\n=sRRj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIALQgVdUxa8GvlJp2frtuw3uxoejuK3dmXcZkUZFWBxsAiEAy92DClaWUDRbV7jIREGfrkuREicuoBHUnd22I5CLgUY="}]},"_npmUser":{"name":"andstor","email":"andr3.storhaug@gmail.com"},"directories":{},"maintainers":[{"name":"andstor","email":"andr3.storhaug@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/smart-contract-slicer_1.0.0_1647883900354_0.8651786813247531"},"_hasShrinkwrap":false}},"time":{"created":"2022-03-21T17:31:40.293Z","1.0.0":"2022-03-21T17:31:40.526Z","modified":"2022-04-04T14:02:42.575Z"},"maintainers":[{"name":"andstor","email":"andr3.storhaug@gmail.com"}],"description":"Utility for slicing contracts into pieces.","homepage":"https://github.com/andstor/smart-contract-slicer#readme","repository":{"type":"git","url":"git+https://github.com/andstor/smart-contract-slicer.git"},"author":{"name":"André Storhaug","email":"andr3.storhaug@gmail.com","url":"https://github.com/andstor"},"bugs":{"url":"https://github.com/andstor/smart-contract-slicer/issues"},"license":"MIT","readme":"# smart-contract-slicer\n\n> :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","readmeFilename":"README.md"}