MCPcopy Create free account
hub / github.com/dataform-co/dataform / stringify

Method stringify

common/strings/stringifier.ts:9–16  ·  view source on GitHub ↗
(value: T)

Source from the content-addressed store, hash-verified

7
8export class JSONObjectStringifier<T> implements IStringifier<T> {
9 public stringify(value: T) {
10 // Sort the object keys.
11 return JSON.stringify(
12 Object.keys(value)
13 .sort()
14 .reduce((acc, curr) => ({ ...acc, [curr]: (value as any)[curr] }), {})
15 );
16 }
17
18 public parse(value: string) {
19 return JSON.parse(value) as T;

Callers 15

compileFunction · 0.80
stringifyResolvableFunction · 0.80
checkExcessPropertiesFunction · 0.80
resolveMethod · 0.80
alterActionNameMethod · 0.80
getUpdatedTargetMethod · 0.80
checkCircularityMethod · 0.80
getNonUniqueTargetsMethod · 0.80
isUniqueActionMethod · 0.80
inputMethod · 0.80
resolveMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected