Components and utilities for the modern web
Node

GetLastModifiedTime

getLastModifiedTime returns the last modified timestamp of a list of source files.

Installation

First, make sure you install Splendid UI.

npm install splendid-ui

Then import getLastModifiedTime into your project.

import { getLastModifiedTime } from 'splendid-ui/node'

Usage

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.

Like what you're seeing?

I'm on a quest to make web development extremely easy — by building components and utilities that will help all of us build better apps at a much faster pace.

I'd like to send you an update when I release something new in Splendid UI. If you want to be updated, please leave your email address below.

Powered by Buttondown