Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

442 B
Raw Blame
import { stripHtml as stripHtmlText } from './text.js';

export function stripHtml(html) {
    return stripHtmlText(html, { preserveBlocks: true });
}

export function normalizeCount(value) {
    return Number.isInteger(value) && value >= 0 ? value : 0;
}

export function normalizeUnixSeconds(value) {
    return typeof value === 'number' && Number.isFinite(value) && value > 0
        ? new Date(value * 1000).toISOString()
        : '';
}