MCPcopy Create free account
hub / github.com/deepnote/deepnote / isValidAbsoluteDateRange

Function isValidAbsoluteDateRange

packages/blocks/src/blocks/input-blocks.ts:56–63  ·  view source on GitHub ↗
(value: DateRangeInputValue)

Source from the content-addressed store, hash-verified

54}
55
56export function isValidAbsoluteDateRange(value: DateRangeInputValue): value is DateTimeStringArray {
57 const YYYY_MM_DD_REGEX = /^\d{4}-\d{2}-\d{2}$/
58 return (
59 Array.isArray(value) &&
60 value.length === 2 &&
61 value.every(v => typeof v === 'string' && (v === '' || YYYY_MM_DD_REGEX.test(v)))
62 )
63}
64
65// Python code generation functions
66export function createPythonCodeForInputTextBlock(block: InputTextBlock): string {

Calls

no outgoing calls

Tested by

no test coverage detected