UNPKG
@produck/json-index-archive
Version:
latest (0.1.3)
0.1.3
0.1.2
0.1.1
0.1.0
@produck/json-index-archive
/
src
/
Archiver
/
Extension
/
birthtime.mjs
8 lines
(5 loc)
•
179 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
import
*
as
fs
from
'node:fs'
;
export
default
async
function
birthtime
(
{ pathname }
) {
const
stat =
await
fs.
promises
.
stat
(pathname);
return
[
Math
.
trunc
(stat.
birthtimeMs
)]; }