fix(shared): Display of part named in workbench
This commit is contained in:
parent
36465d7302
commit
28f82019f6
6 changed files with 32 additions and 10 deletions
|
@ -457,3 +457,13 @@ export const randomString = (len = 42) => {
|
|||
window.crypto.getRandomValues(arr) // eslint-disable-line
|
||||
return Array.from(arr, dec2hex).join('')
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets the pattern namespaces based on patternConfig
|
||||
*/
|
||||
export const patternNsFromPatternConfig = (config) => {
|
||||
const ns = new Set()
|
||||
for (const part of config.draftOrder) ns.add(part.split('.')[0])
|
||||
|
||||
return [...ns]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue