MCPcopy Index your code
hub / github.com/lingodotdev/lingo.dev / createJson5Loader

Function createJson5Loader

packages/cli/src/cli/loaders/json5.ts:5–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { createLoader } from "./_utils";
4
5export default function createJson5Loader(): ILoader<
6 string,
7 Record<string, any>
8> {
9 return createLoader({
10 pull: async (locale, input) => {
11 const json5String = input || "{}";
12 return JSON5.parse(json5String);
13 },
14 push: async (locale, data) => {
15 const serializedData = JSON5.stringify(data, null, 2);
16 return serializedData;
17 },
18 });
19}

Callers 2

json5.spec.tsFile · 0.85
createBucketLoaderFunction · 0.85

Calls 2

createLoaderFunction · 0.90
parseMethod · 0.80

Tested by

no test coverage detected