JSPM

parse-git-index

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q31457F
  • License MIT

parse git index

Package Exports

  • parse-git-index

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (parse-git-index) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Parse Git Index License NPM version Dependency Status Build Status Coverage

Parse git index file.

Install

npm i parse-git-index

How to use?

const {readFileSync} = require('fs');
const parse = require('parse-git-index');
const index = readFileSync('./.git/index');

parse(index);
// returns
{
    "header": {
        "signature": "DIRC",
        "version": "0x2",
        "count": "0x1"
    },
    "entries": [
        {
            "ctime": "0x5d8893b223ad1e53",
            "mtime": "0x5d8893b223ad1e53",
            "dev": "0xfd01",
            "ino": "0x8e850",
            "mode": "0x81a4",
            "uid": "0x3e8",
            "gid": "0x3e8",
            "fileSize": "0x9b",
            "objectId": "0xaa148880272ec1d0488346da70e2dad451e8d3bf",
            "filePathSize": "0xe",
            "filePath": ".eslintrc.json"
        },
    ]
}

License

MIT