mirror of
https://github.com/stablyai/orca.git
synced 2026-10-20 16:03:20 +00:00
Files: 18 applied, 0 deleted (from 6eb70d8370)
Co-authored-by: Orca <help@stably.ai>
11 lines
333 B
TypeScript
11 lines
333 B
TypeScript
import { stringifyJsonWithinByteLimit } from './node-bounded-json-stringify'
|
|
import { writeSecureFile } from './secure-file'
|
|
|
|
export function writeSecureJsonFileWithinLimit(
|
|
targetPath: string,
|
|
value: unknown,
|
|
maxBytes: number
|
|
): void {
|
|
writeSecureFile(targetPath, stringifyJsonWithinByteLimit(value, maxBytes).serialized)
|
|
}
|