JSPM

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

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

https://github.com/Brooooooklyn/simple-git/actions Install size

getFileLatestModifiedDateByGit

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

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

getFileLatestModifiedDateByGitAsync

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.920Z

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