{"name":"parse-diff","version":"0.12.0","description":"Unified diff parser","author":{"name":"Sergey Todyshev","email":"stodyshev@gmail.com"},"main":"index.js","types":"index.d.ts","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/sergeyt/parse-diff.git"},"keywords":["diff","unidiff","parser"],"devDependencies":{"@biomejs/biome":"^2.4.12","esbuild":"^0.28.0","jest":"^30.3.0"},"scripts":{"lint:fix":"biome check --write .","lint":"biome check .","build":"esbuild parse.js --minify --outfile=index.js","test":"jest","ci":"npm run lint && npm test"},"gitHead":"5a66fd933851563b7d5e61f0c5348699194460c1","_id":"parse-diff@0.12.0","bugs":{"url":"https://github.com/sergeyt/parse-diff/issues"},"homepage":"https://github.com/sergeyt/parse-diff#readme","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-2Xr5mW4Bqd4CqYq2zttfw/RZraK+KcRuJvNkJzbDk3ea67Ap525XeTvBdtDE5tigJMVzIx/DMUzsShAf6+5SCA==","shasum":"2ea129ba56d1e1594df784c1168e38ea711974a8","tarball":"http://registry-npm.ywwl.com/parse-diff/download/parse-diff-0.12.0.tgz","fileCount":13,"unpackedSize":34232,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC3wzj2r4lJHv8uESP02HDiR617mxUX8ttFqXWwd3ALNwIhAMu5qyKIvpzz9GvORLQFOv9jYGOaU8uSiXXM9P+PBb4A"}],"size":8113,"noattachment":false,"key":"/parse-diff/-/parse-diff-0.12.0.tgz"},"_npmUser":{"name":"sergeyt","email":"stodyshev@gmail.com"},"directories":{},"maintainers":[{"name":"sergeyt","email":"stodyshev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/parse-diff_0.12.0_1776461660420_0.23368762448466418"},"_hasShrinkwrap":false,"readme":"[![Build Status](https://github.com/sergeyt/parse-diff/actions/workflows/ci.yml/badge.svg)](https://github.com/sergeyt/parse-diff/actions/workflows/ci.yml)\n[![Total downloads](https://img.shields.io/npm/dt/parse-diff.svg)](https://www.npmjs.com/package/parse-diff)\n\n[![NPM](https://nodei.co/npm/parse-diff.png?downloads=true&stars=true)](https://nodei.co/npm/parse-diff/)\n\n# parse-diff\n\nSimple unified diff parser for JavaScript\n\n## JavaScript Usage Example\n\n```javascript\nvar parse = require('parse-diff');\nvar diff = ''; // input diff string\nvar files = parse(diff);\nconsole.log(files.length); // number of patched files\nfiles.forEach(function(file) {\n\tconsole.log(file.chunks.length); // number of hunks\n\tconsole.log(file.chunks[0].changes.length) // hunk added/deleted/context lines\n\t// each item in changes is a string\n\tconsole.log(file.deletions); // number of deletions in the patch\n\tconsole.log(file.additions); // number of additions in the patch\n});\n```\n","publish_time":1776461660570,"_cnpm_publish_time":1776461660570,"dist-tags":{"latest":"0.12.0"}}