persona-community-5/.pnpm-store/v3/files/bb/7be222376ce08db9aac4a91d2636788ceb73da741c45ace1f139eec80338627f43524e0e52d4221f9a79725e734e22abe7c4881a16e38a927289aab32970be
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

17 lines
699 B
Plaintext

// TODO: add a type for "types" https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/js-yaml/index.d.ts
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import { JSON_SCHEMA, types, load, dump } from 'js-yaml';
import type { LoadOptions, DumpOptions } from 'js-yaml';
const DEFAULT_SCHEMA_WITHOUT_TIMESTAMP = JSON_SCHEMA.extend({
implicit: [types.merge],
explicit: [types.binary, types.omap, types.pairs, types.set],
});
export const parseYaml = (str: string, opts?: LoadOptions): unknown =>
load(str, { schema: DEFAULT_SCHEMA_WITHOUT_TIMESTAMP, ...opts });
export const stringifyYaml = (obj: any, opts?: DumpOptions): string => dump(obj, opts);