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

Function createToken

variables-import-export/code.js:9–13  ·  view source on GitHub ↗
(collection, modeId, type, name, value)

Source from the content-addressed store, hash-verified

7}
8
9function createToken(collection, modeId, type, name, value) {
10 const token = figma.variables.createVariable(name, collection, type);
11 token.setValueForMode(modeId, value);
12 return token;
13}
14
15function createVariable(collection, modeId, key, valueKey, tokens) {
16 const token = tokens[valueKey];

Callers 2

createVariableFunction · 0.85
traverseTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected