MCPcopy
hub / github.com/figma/plugin-samples / createVariable

Function createVariable

variables-import-export/code.js:15–21  ·  view source on GitHub ↗
(collection, modeId, key, valueKey, tokens)

Source from the content-addressed store, hash-verified

13}
14
15function createVariable(collection, modeId, key, valueKey, tokens) {
16 const token = tokens[valueKey];
17 return createToken(collection, modeId, token.resolvedType, key, {
18 type: "VARIABLE_ALIAS",
19 id: `${token.id}`,
20 });
21}
22
23function importJSONFile({ fileName, body }) {
24 const json = JSON.parse(body);

Callers 2

processAliasesFunction · 0.85
traverseTokenFunction · 0.85

Calls 1

createTokenFunction · 0.85

Tested by

no test coverage detected