MCPcopy Create free account
hub / github.com/Snapchat/Valdi / generateAndroidResourceFile

Function generateAndroidResourceFile

compiler/companion/src/GenerateIds.ts:91–104  ·  view source on GitHub ↗
(ids: Id[])

Source from the content-addressed store, hash-verified

89}
90
91function generateAndroidResourceFile(ids: Id[]): string {
92 const androidItems: object[] = ids.map((id) => {
93 return { _attributes: { type: 'id', name: id.androidCompatibleIdentifier } };
94 });
95
96 return xml.js2xml(
97 {
98 resources: {
99 item: androidItems,
100 },
101 },
102 { compact: true, spaces: 2 },
103 );
104}
105
106function generateIOSIds(ids: Id[], iosHeaderImportPath: string): ObjectiveCFile {
107 const header = new ObjectiveCWriter();

Callers 1

generateIdsFunction · 0.85

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected