Skip to content

cheere/rxgitcid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rxgitcid

Get the commit ID of the last commit of git.

npm i rxgitcid --save-dev

Usage

  // node / cjs
  const rxgitcid = require('rxgitcid')
  // or
  import rxgitcid from 'rxgitcid'

  // 1
  const gitLastId = rxgitcid.cidSync()
  console.log('id =', gitLastId) // ec0b419

  // 2
  rxgitcid.cid(id => {
    console.log('cb id =', id) // ec0b419
  })

api

  1. cid
  2. cidSync

License

MIT