Skip to content

Instantly share code, notes, and snippets.

type VDate = Date
type VDateContext = {
current: (actualBase?: Date) => VDate;
toVirtual: (date: Date) => VDate;
toActual: (date: VDate) => Date;
mapToVirtual: (date: Date, actualBase?: Date) => VDate;
}
const createContext = (factor: number, _virtualBase?: Date): VDateContext => {
import * as AWS from 'aws-sdk'
export const fetch = async (startKey?: AWS.DynamoDB.Key | undefined) => {
const ddb = new AWS.DynamoDB({
endpoint: 'http://localhost:8000'
})
const limit = 6
const defaultInput: AWS.DynamoDB.ScanInput = {