Skip to content

Releases: Brooooooklyn/simple-git

v0.1.0

14 Mar 08:37
v0.1.0
c841a64
Compare
Choose a tag to compare

First release ⚡️

Performance

Compared with the exec function, which gets the file's latest modified date by spawning a child process. Getting the latest modified date from the file 1000 times:

Child process took 1.9s
@napi-rs/simple-git took 65ms

getFileLatestModifiedDateByGit

import { getFileLatestModifiedDateByGit } from '@napi-rs/simple-git`

const timestamp = new Date(getFileLatestModifiedDateByGit('.', 'build.rs'))
console.log(timestamp) // 2022-03-13T12:47:47.920Z