Something went wrong. Try again.
fork of hey-api/openapi-ts because I need some additional things
Something went wrong. Try again.
205 B · 8 lines
TypeScript
123456789import { EOL } from 'node:os';
export function escapeComment(value: string) { return value .replace(/\*\//g, '*') .replace(/\/\*/g, '*') .replace(/\r?\n(.*)/g, (_l, w) => EOL + w.trim());}