main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

25
node_modules/d3-time/src/millisecond.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
import {timeInterval} from "./interval.js";
export const millisecond = timeInterval(() => {
// noop
}, (date, step) => {
date.setTime(+date + step);
}, (start, end) => {
return end - start;
});
// An optimized implementation for this simple case.
millisecond.every = (k) => {
k = Math.floor(k);
if (!isFinite(k) || !(k > 0)) return null;
if (!(k > 1)) return millisecond;
return timeInterval((date) => {
date.setTime(Math.floor(date / k) * k);
}, (date, step) => {
date.setTime(+date + step * k);
}, (start, end) => {
return (end - start) / k;
});
};
export const milliseconds = millisecond.range;