You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/interpolate/index.js

17 lines
394 B

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function dates(a, b) {
const difference = (b = new Date(b).getTime()) - (a = new Date(a).getTime());
const d = new Date(a);
return (t) => (d.setTime(a + difference * t), d);
}
function numbers(a, b) {
const d = (b = +b) - (a = +a);
return (t) => a + d * t;
}
exports.dates = dates;
exports.numbers = numbers;