Implemented Xml Struct

This commit is contained in:
Kevin Jahns
2017-08-24 14:44:23 +02:00
parent 86c46cf0ec
commit ab6cde07e6
19 changed files with 1087 additions and 590 deletions

View File

@@ -840,4 +840,17 @@ export default function Utils (Y) {
}
}
Y.utils.generateUserId = generateUserId
Y.utils.parseTypeDefinition = function parseTypeDefinition (type, typeArgs) {
var args = []
try {
args = JSON.parse('[' + typeArgs + ']')
} catch (e) {
throw new Error('Was not able to parse type definition!')
}
if (type.typeDefinition.parseArguments != null) {
args = type.typeDefinition.parseArguments(args[0])[1]
}
return args
}
}