Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/style-dictionary/style-dictionary
/ functions
Functions
387 in github.com/style-dictionary/style-dictionary
⨍
Functions
387
◇
Types & classes
88
↓ 2 callers
Method
registerPreprocessor
* @param {Preprocessor} cfg
lib/Register.js:343
↓ 2 callers
Function
registerValidSW
(swUrl, config)
examples/advanced/create-react-app/src/serviceWorker.js:55
↓ 2 callers
Method
render
()
examples/advanced/create-react-app/src/components/with-sass/ComponentWithSass.js:6
↓ 2 callers
Function
renderMermaid
()
docs/src/setup.ts:27
↓ 2 callers
Function
resolveReferences
(value, tokens, opts)
lib/utils/references/resolveReferences.js:26
↓ 2 callers
Method
saveFile
()
docs/src/components/sd-playground.ts:408
↓ 2 callers
Function
setSwiftFileProperties
(options, objectType, transformGroup)
lib/common/formatHelpers/setSwiftFileProperties.js:13
↓ 2 callers
Function
shouldExpand
* @param {DesignToken} token * @param {Config} opts * @param {PlatformConfig} [platform]
lib/utils/expandObjectTokens.js:79
↓ 2 callers
Method
shouldRunExpansion
* @param {ExpandConfig} [expandCfg] * @returns
lib/StyleDictionary.js:363
↓ 2 callers
Function
swapTheme
(theme: Theme)
docs/src/setup.ts:58
↓ 2 callers
Function
tokenSetup
(token, name, path)
lib/transform/tokenSetup.js:19
↓ 2 callers
Function
tokenToType
* @param {Token} token * @param {Config} options * @returns {string}
lib/common/templates/android/resources.template.js:40
↓ 2 callers
Function
transformConfig
(platformConfig, dictionary, platformName)
lib/transform/config.js:28
↓ 2 callers
Function
transformMap
( tokenMap, config, options, { transformedPropRefs = new Set(), deferredPropValueTransforms = new Set(
lib/transform/map.js:22
↓ 2 callers
Function
transformToken
(token, config, options, vol)
lib/transform/token.js:82
↓ 2 callers
Function
typeDtcgDelegate
(tokens)
lib/utils/typeDtcgDelegate.js:13
↓ 2 callers
Method
undo
A function that undoes the action.
types/Action.ts:16
↓ 2 callers
Function
validateBlobType
* @param {Blob} blob * @param {string} type * @param {string} [path]
lib/utils/convertToDTCG.js:155
↓ 2 callers
Function
wrapValueWith
* @param {string} character * @param {Token} token * @param {Config} options * @returns {string}
lib/common/transforms.js:263
↓ 2 callers
Function
writeZIP
(zipEntries)
lib/utils/convertToDTCG.js:129
↓ 1 callers
Function
App
()
examples/advanced/create-react-native-app/src/App.js:6
↓ 1 callers
Function
TRANSFORMED_TOKENS
(usesDtcg)
__tests__/common/formatHelpers/sortByReference.test.js:4
↓ 1 callers
Method
__registerAction
* @param {Action} action * @param {typeof Register | Register} target
lib/Register.js:237
↓ 1 callers
Method
__registerFileHeader
* @param {{name: string; fileHeader: FileHeader;}} cfg * @param {typeof Register | Register} target
lib/Register.js:402
↓ 1 callers
Method
__registerFilter
* @param {Filter} filter * @param {typeof Register | Register} target
lib/Register.js:275
↓ 1 callers
Method
__registerFormat
* @param {Format} format * @param {typeof Register | Register} target
lib/Register.js:197
↓ 1 callers
Method
__registerParser
* @param {Parser} parser * @param {typeof Register | Register} target
lib/Register.js:315
↓ 1 callers
Method
__registerPreprocessor
* @param {Preprocessor} cfg * @param {typeof Register | Register} target
lib/Register.js:360
↓ 1 callers
Method
__registerTransform
* @param {Transform} transform * @param {typeof Register | Register} target
lib/Register.js:108
↓ 1 callers
Method
__registerTransformGroup
* @param {{ name: string; transforms: string[]; }} transformGroup * @param {typeof Register | Register} target
lib/Register.js:153
↓ 1 callers
Method
_exportPlatform
* @param {string} platform * @returns {Promise<Dictionary>}
lib/StyleDictionary.js:423
↓ 1 callers
Function
_flattenTokens
* @private * @template {Token | TransformedToken} T * @template {Tokens | TransformedTokens} U * @param {U} slice - The plain object you want flat
lib/utils/flattenTokens.js:20
↓ 1 callers
Function
_resolveReferences
( value, tokenMap, { usesDtcg = false, warnImmediately = true, // for internal usage ign
lib/utils/references/resolveReferencesMap.js:35
↓ 1 callers
Function
_stripMeta
(obj, options)
lib/utils/stripMeta.js:10
↓ 1 callers
Function
_transformTokenWrapper
* @param {Transform} transform * @param {Token} token * @param {PlatformConfig} config * @param {Config} options * @param {Volume} [vol]
lib/transform/token.js:44
↓ 1 callers
Function
analyzeDependencies
(code: string)
docs/src/utils/analyzeDependencies.ts:6
↓ 1 callers
Function
blobToDataUrl
* @typedef {import('@types/chai')} Chai
snapshot-plugin/chai-wtr-snapshot.js:16
↓ 1 callers
Function
borderTransform
(value)
__tests__/common/transforms.test.js:2030
↓ 1 callers
Function
buildDictionary
* * @param {TransformedTokens} slice * @param {Config & LocalOptions} options * @param {string} [indent]
lib/common/templates/ios/singleton.m.template.js:16
↓ 1 callers
Function
buildToken
* * @param {TransformedToken} token * @param {Config & LocalOptions} options * @returns
lib/common/templates/ios/strings.m.template.js:15
↓ 1 callers
Function
changeLang
(lang: string, ed: typeof monacoType.editor)
docs/src/monaco/monaco.ts:125
↓ 1 callers
Function
checkValidServiceWorker
(swUrl, config)
examples/advanced/create-react-app/src/serviceWorker.js:99
↓ 1 callers
Function
cleanActions
(dictionary, platform, options, vol = fs)
lib/cleanActions.js:22
↓ 1 callers
Function
cleanConsoleOutput
(str)
__tests__/__helpers.js:7
↓ 1 callers
Function
clearSDMeta
(tokens)
__tests__/__helpers.js:72
↓ 1 callers
Function
convertToTokenMap
* @template {Token} T * @param {Array<T>} flattenedTokens * @returns {Map<string, T>}
lib/utils/convertTokenData.js:20
↓ 1 callers
Function
convertToTokenObject
* @param {Token[]} tokenArray * @returns
lib/utils/convertTokenData.js:32
↓ 1 callers
Function
createErrorMessage
* * @param {Token} token * @param {Error} error * @param {string} name * @param {boolean} usesDtcg
lib/transform/token.js:29
↓ 1 callers
Function
createReferenceRegex
* @param {boolean} [captureGroups] * @returns {RegExp}
lib/utils/references/createReferenceRegex.js:8
↓ 1 callers
Function
cubicBezierTransform
(token)
__tests__/common/transforms.test.js:1921
↓ 1 callers
Function
dirs
(p)
examples/advanced/matching-build-files/tokens/index.js:3
↓ 1 callers
Method
do
The action in the form of a function.
types/Action.ts:8
↓ 1 callers
Function
downloadJSON
(stringOrBlob, filename = 'output.json')
lib/utils/downloadFile.js:29
↓ 1 callers
Function
dtcgColorToRgb
* Get the sRGB representation of a color, with gamut mapping if needed * Uses the hex property as fallback if provided and color is out of gamut * @
lib/common/transforms.js:110
↓ 1 callers
Function
ensureDirectoryExists
* @param {string} filePath
__tests__/__setup.js:34
↓ 1 callers
Function
enumNodes
(enumDirectory)
docs/src/remark-enums.js:16
↓ 1 callers
Function
errorMessage
(amount = 1)
__tests__/exportPlatform.test.js:344
↓ 1 callers
Function
escapeTildes
* @param {string} [str]
snapshot-plugin/chai-wtr-snapshot.js:60
↓ 1 callers
Function
exists
* Async method for checking if a file exists. * Since there is no promises.exists method in Node.js... * @param {Volume} vol * @param {string} file
lib/cleanFile.js:17
↓ 1 callers
Method
fileSwitch
(val: 'tokens' | 'config' | 'script' | 'output')
docs/src/components/sd-playground.ts:362
↓ 1 callers
Function
filterTokenObject
* Takes a nested object of tokens and filters them using the provided * function. * * @param {Tokens} tokens * @param {Filter['filter']} filter -
lib/filterTokens.js:35
↓ 1 callers
Function
fn
(arr)
lib/common/formatHelpers/fileHeader.js:59
↓ 1 callers
Function
fontFamilyTransform
(token)
__tests__/common/transforms.test.js:1840
↓ 1 callers
Function
formatArgs
(usesDtcg, customFile)
__tests__/formats/typeScriptEs6Declarations.test.js:61
↓ 1 callers
Function
formatArgs
(usesDtcg)
__tests__/formats/es6Constants.test.js:77
↓ 1 callers
Function
formatJS
* Prettier format JS contents * @param {string} content * @param {boolean} [ts] whether or not to use typescript
lib/common/formats.js:144
↓ 1 callers
Function
generateTokens
({ key, type, value, amount, refDepth = 1 })
__perf_tests__/basic.test.js:60
↓ 1 callers
Function
getArrayType
* @param {any[]} arr An array to check each property of * @returns {String} A valid type for the passed array and it's items
lib/common/formatHelpers/getTypeScriptType.js:60
↓ 1 callers
Function
getAssetDir
* @param {Config} config
lib/common/actions.js:18
↓ 1 callers
Function
getAssetPath
* @param {Token} token * @param {string} imagesDir
lib/common/actions.js:26
↓ 1 callers
Function
getBasePxFontSize
* @param {PlatformConfig} config * @returns {number}
lib/common/transforms.js:292
↓ 1 callers
Function
getBuiltinHooks
* @return {Required<Hooks>}
lib/Register.js:25
↓ 1 callers
Function
getColor
(token, options)
lib/common/transforms.js:162
↓ 1 callers
Function
getFormattingCloneWithoutPrefix
* Remove prefix because the prefix option for createPropertyFormatter * is not the same as the prefix inside header comment * @param {FormattingOver
lib/common/formats.js:165
↓ 1 callers
Function
getLang
(lang: string)
docs/src/components/sd-playground.ts:42
↓ 1 callers
Method
getMainComponentName
Returns the name of the main component registered from JavaScript. This is used to schedule rendering of the component.
examples/advanced/create-react-native-app/android/app/src/main/java/com/createreactnativeapp/MainActivity.java:27
↓ 1 callers
Method
getNodeArrayForObject
examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/util/StyleDictionaryHelper.kt:27
↓ 1 callers
Function
getObjectType
* @param {Object} value An object with uknown type properties * @returns {String} A representation of the type model for the passed object
lib/common/formatHelpers/getTypeScriptType.js:46
↓ 1 callers
Method
getReactNativeHost
()
examples/advanced/create-react-native-app/android/app/src/main/java/com/createreactnativeapp/MainApplication.java:73
↓ 1 callers
Function
getStyleDictionaryConfig
(brand, platform)
examples/advanced/multi-brand-multi-platform/build.js:8
↓ 1 callers
Function
getTestPath
(runnable, index)
snapshot-plugin/chai-wtr-snapshot.js:21
↓ 1 callers
Function
gradientTransform
(value, platformConfig = {})
__tests__/common/transforms.test.js:2356
↓ 1 callers
Function
handleResize
()
docs/src/setup.ts:108
↓ 1 callers
Function
handleThemeChange
()
docs/src/setup.ts:77
↓ 1 callers
Function
iconsWithPrefix
(prefix, allTokens, options, platform)
lib/common/formatHelpers/iconsWithPrefix.js:30
↓ 1 callers
Function
init
(elem: HTMLDivElement)
docs/src/monaco/monaco.ts:103
↓ 1 callers
Method
init
()
docs/src/components/sd-playground.ts:271
↓ 1 callers
Method
initConfig
(tokens: Record<string, unknown>)
docs/src/components/sd-playground.ts:332
↓ 1 callers
Method
initMonaco
()
docs/src/components/sd-playground.ts:278
↓ 1 callers
Method
initScript
()
docs/src/components/sd-playground.ts:300
↓ 1 callers
Method
initTokens
()
docs/src/components/sd-playground.ts:313
↓ 1 callers
Method
initializeFlipper
Loads Flipper in React Native templates. Call this in the onCreate method with something like initializeFlipper(this, getReactNativeHost().getReactIns
examples/advanced/create-react-native-app/android/app/src/main/java/com/createreactnativeapp/MainApplication.java:97
↓ 1 callers
Function
isColor
(token, options)
lib/common/transforms.js:202
↓ 1 callers
Function
isDimension
* @param {Token} token * @param {Config} options * @returns {boolean}
lib/common/transforms.js:226
↓ 1 callers
Function
isFontSize
* @param {Token} token * @param {Config} options * @returns {boolean}
lib/common/transforms.js:235
↓ 1 callers
Function
lazilyLoadCEs
(CEs: string[])
docs/src/setup.ts:91
↓ 1 callers
Function
load
()
__tests__/utils/loadFile.test.js:34
↓ 1 callers
Method
loadJSON
examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/util/StyleDictionaryHelper.kt:18
↓ 1 callers
Function
matchFn
(inputObj, testObj)
lib/transform/config.js:137
↓ 1 callers
Function
matches
(matchObj)
lib/transform/config.js:148
← previous
next →
101–200 of 387, ranked by callers