Splendid UI
Components and utilities for the modern web
-->
getLastModifiedTime
returns the last modified timestamp of a list of source files.
First, make sure you install Splendid UI.
npm install splendid-ui
Then import getLastModifiedTime
into your project.
import { getLastModifiedTime } from 'splendid-ui/node'
getLastModifiedTime
takes in a glob value for files.
It returns the last modified timestamp of the list of given files.
// Gets the latest modified timestamp of all the files in src/content
const lastModified = await getLatestModifiedTime('src/content/**/*')
This utility works closely with fileCache
utility.