Package Exports
- @napi-rs/simple-git
- @napi-rs/simple-git/index.js
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 (@napi-rs/simple-git) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@napi-rs/simple-git
getFileLatestModifiedDateByGit
import { getFileLatestModifiedDateByGit } from '@napi-rs/simple-git`
const timestamp = new Date(getFileLatestModifiedDateByGit('.', 'build.rs'))
console.log(timestamp) // 2022-03-13T12:47:47.920ZgetFileLatestModifiedDateByGitAsync
Non blocking API for getFileLatestModifiedDateByGit:
import { getFileLatestModifiedDateByGitAsync } from '@napi-rs/simple-git`
const timestamp = new Date(await getFileLatestModifiedDateByGitAsync('.', 'build.rs'))
console.log(timestamp) // 2022-03-13T12:47:47.920ZPerformance
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