{"name":"g-status","version":"1.0.0","description":"Get the change between index (or staging-area) and working directory of a `git` repository","license":"MIT","repository":{"type":"git","url":"git+https://github.com/luftywiranda13/g-status.git"},"author":{"name":"Lufty Wiranda","email":"lufty.wiranda@gmail.com","url":"https://www.luftywiranda.com"},"engines":{"node":">=6"},"scripts":{"precommit":"remove-lockfiles && xo --fix && lint-staged","test:watch":"jest --watch","test":"xo && jest --coverage"},"files":["index.js"],"dependencies":{"arrify":"^1.0.1","matcher":"^1.0.0","merge-options":"^1.0.0","simple-git":"^1.85.0"},"devDependencies":{"async-to-gen":"^1.3.3","eslint-config-prettier":"^2.9.0","execa":"^0.9.0","fixturez":"^1.1.0","fs-extra":"^5.0.0","husky":"^0.14.3","jest":"^22.0.4","lint-staged":"^6.0.0","prettier":"^1.9.2","remove-lockfiles":"^2.0.4","xo":"^0.18.2"},"jest":{"testEnvironment":"node","transform":{"^.+\\.js$":"async-to-gen"}},"lint-staged":{"*.{js,json,md}":["prettier --write","git add"]},"prettier":{"singleQuote":true,"trailingComma":"es5"},"xo":{"extends":"prettier","envs":["jest"]},"keywords":["git-status","git","index-area","staged","staging-area","staging","status","work-tree","working-directory","worktree"],"gitHead":"70690f329b0535f47beacfc1669563d10bdb228e","bugs":{"url":"https://github.com/luftywiranda13/g-status/issues"},"homepage":"https://github.com/luftywiranda13/g-status#readme","_id":"g-status@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"luftywiranda13","email":"lufty.wiranda@gmail.com"},"dist":{"integrity":"sha512-sVTsRMEO9otiEJysX5JMqconFbk91kJhEfDj+LAZMOaU2pFVtU+uZozDN0Rq1wYCZalUPCepVU7wtJGtfmkyZQ==","shasum":"b86f79b08538641d8829f92011b96e5518bf689f","tarball":"http://registry-npm.ywwl.com/g-status/download/g-status-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5r2dwB/Sy5Li6syqxx9Xg6wej2CGMJSwA5TXPqIYPAgIgMY6xJSqY3pVJT6+maB4s32DkRCmDX+KhYNZf2wjQanI="}],"size":3098,"noattachment":false,"key":"/g-status/-/g-status-1.0.0.tgz"},"maintainers":[{"name":"luftywiranda13","email":"lufty.wiranda@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/g-status-1.0.0.tgz_1516577004708_0.022013216046616435"},"directories":{},"readme":"# g-status\n\n> Get the change between index (or staging-area) and working directory of a `git` repository\n\n[![Package Version](https://img.shields.io/npm/v/g-status.svg?style=flat-square)](https://www.npmjs.com/package/g-status)\n[![Downloads Status](https://img.shields.io/npm/dm/g-status.svg?style=flat-square)](https://npm-stat.com/charts.html?package=g-status&from=2016-04-01)\n[![Build Status: Linux](https://img.shields.io/travis/luftywiranda13/g-status/master.svg?style=flat-square)](https://travis-ci.org/luftywiranda13/g-status)\n[![Coverage Status](https://img.shields.io/codecov/c/github/luftywiranda13/g-status/master.svg?style=flat-square)](https://codecov.io/gh/luftywiranda13/g-status)\n\nThink of `git status` or `git status --porcelain`, but returns a _ready-to-consume_ result.\n\n## Why\n\n* Maintained\n* Accepts simple [wildcard matching](https://github.com/sindresorhus/matcher) patterns\n* Promise API\n* Ability to get specific results based on status codes\n* Knows which files are partially/fully-staged\n\n## Installation\n\n```sh\nnpm install g-status\n```\n\n## Usage\n\n```sh\n$ git status --porcelain\n\nA  .travis.yml  # fully-staged\nMM index.js     # partially-staged\n M readme.md    # unstaged\n```\n\n```js\nconst gStatus = require('g-status');\n\ngStatus().then(res => {\n  console.log(res);\n  /*\n    [\n      { path: '.travis.yml', index: 'A', workingTree: ' ' },\n      { path: 'index.js', index: 'M', workingTree: 'M' },\n      { path: 'readme.md', index: ' ', workingTree: 'M' }\n    ]\n  */\n});\n\ngStatus({ path: ['!*.js', '!*.md'] }).then(res => {\n  console.log(res);\n  //=> [{ path: '.travis.yml', index: 'A', workingTree: ' ' }]\n});\n\n// Files marked as `Modified` or `Added` in the staging area,\ngStatus({ index: 'MA' }).then(res => {\n  console.log(res);\n  /*\n    [\n      { path: '.travis.yml', index: 'A', workingTree: ' ' },\n      { path: 'index.js', index: 'M', workingTree: 'M' },\n    ]\n  */\n});\n\n// Files that arenʼt changed in the working tree\ngStatus({ workingTree: ' ' }).then(res => {\n  console.log(res);\n  //=> [{ path: '.travis.yml', index: 'A', workingTree: ' ' }]\n});\n\n// Files that are marked as `Modified` both in staging area and working tree\ngStatus({ index: 'M', workingTree: 'M' }).then(res => {\n  console.log(res);\n  //=> [{ path: 'index.js', index: 'M', workingTree: 'M' }]\n});\n```\n\nSee the [tests](https://github.com/luftywiranda13/g-status/blob/master/test.js) for more usage examples and expected matches.\n\n## API\n\n### gStatus([options])\n\nReturns `Promise<{ path: string, index: string, workingTree: string }[]>`.\n\n#### options\n\nType: `Object`\n\n##### cwd\n\nType: `string`<br />\nDefault: `process.cwd()`\n\nCurrent working directory.\n\n##### path\n\nType: `string` | `string[]`<br />\nDefault: `*`\n\nUse `*` to match zero or more characters. A pattern starting with `!` will be negated.\n\n##### index\n\nType: `string`<br />\nDefault: `*`\n\nString of `git` status codes of the index/staging-area, See [Short Format](https://git-scm.com/docs/git-status#_short_format).<br />\nOne difference is that `*` will match all value here.\n\n##### workingTree\n\nType: `string`<br />\nDefault: `*`\n\nString of `git` status codes of the working tree, See [Short Format](https://git-scm.com/docs/git-status#_short_format).<br />\nOne difference is that `*` will match all value here.\n\n## Related\n\n* [simple-git](https://github.com/steveukx/git-js) – Simple git interface for Node.js\n* [staged-git-files](https://github.com/mcwhittemore/staged-git-files) – Abandoned, the latest commit was 3 years ago\n\n## License\n\nMIT &copy; [Lufty Wiranda](https://www.luftywiranda.com)\n","publish_time":1516577004775,"_cnpm_publish_time":1516577004775,"dist-tags":{"latest":"2.0.2"}}