Skip to main content

Data Type

specialCharacter

schemas.dataType.specialCharacter().getValue() // '_'

boolean

schemas.dataType.boolean().getValue() // true

int

schemas.dataType.int().getValue() // 462
schemas.dataType.int().getValue({ min: 10, max: 30 }) // 28
ArgumentDescription
minMinimun posible value
maxMaximun posible value

float

schemas.dataType.float().getValue() // 462.12
schemas.dataType.float().getValue({ min: 10, max: 30 }) // 10.23
schemas.dataType.number().getValue({ precision: 4 }) // 90.5362
ArgumentDescription
minMinimun posible value
maxMaximun posible value
precisionPrecision of the float. Must be a value between 1 and 20. Default 2

number

schemas.dataType.number().getValue() // 301
schemas.dataType.number().getValue({ min: 10, max: 30 }) // 10.2327
ArgumentDescription
minMinimun posible value
maxMaximun posible value
precisionPrecision of the float. Must be a value between 0 and 20

hexadecimal

schemas.dataType.hexadecimal().getValue() // '009df'
schemas.dataType.hexadecimal().getValue({ length: 3 }) // '01D'
schemas.dataType.hexadecimal().getValue({ lenght: 3, case: 'upper' }) // 'DE20'
ArgumentDescription
caseCase of the values inside de hexadecimal code (mixed, lower, upper)
lengthLenght of the hexadecimal code

matrix

schemas.dataType.matrix().getValue() // [[1, 0, 5], [5, 10, 9]]
schemas.dataType.matrix().getValue({ x_size: 4, y_size: 2 }) // [[1, 2], [0, 0], [1, 1], [4, 5]]
ArgumentDescription
x_sizeColumns size
y_sizeRow size
minMin value for the numbers of the matrix
maxMax value for the numbers of the matrix
precisionNumber precision of the matrix

characters

schemas.dataType.characters().getValue() // 'v'
schemas.dataType.characters().getValue({ length: 5 }) // 'bhtlw'
schemas.dataType.characters().getValue({ length: 5, case: 'upper' }) // 'HQRSD'
ArgumentDescription
lengthLength of characters
caseCase of the characters ('lower' or 'upper')

binaryCode

schemas.dataType.binaryCode().getValue() // '00101'
schemas.dataType.binaryCode().getValue({ length: 6 }) // '010100'
ArgumentDescription
lengthLength of the binary code

alphaNumeric

schemas.dataType.alphaNumeric().getValue() // 'b29o'
schemas.dataType.alphaNumeric().getValue({ length: 7 }) // 'HN5fR2w'
schemas.dataType.alphaNumeric().getValue({ banned: 'arf' }) // 'HN5vR2w'
schemas.dataType.alphaNumeric().getValue({ banned: ['a', 'r', 'f'] }) // 'HN5vR2w'
schemas.dataType
.alphaNumeric()
.getValue({ banned: ['a', 'r', 'f'], case: 'lower' }) // 'l09bct'
ArgumentDescription
lengthLength of the string
caseCase of the string. (lower, upper, mixed)
bannedCharacters that cannot appear in the string. It can be an array of characters or a string with all the characters