UNPKG

date-fns

Version:

Modern JavaScript date utility library

10 lines (8 loc) 257 B
import { constructFrom } from "../constructFrom.js"; export function normalizeDates(context, ...dates) { const normalize = constructFrom.bind( null, context || dates.find((date) => typeof date === "object"), ); return dates.map(normalize); }