mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-26 06:05:45 +00:00
feature: add randomNanoId to dynamic variables (#4932)
This commit is contained in:
@@ -22,6 +22,7 @@ describe("mockDataFunctions Regex Validation", () => {
|
||||
const patterns: Record<string, RegExp> = {
|
||||
guid: /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/,
|
||||
randomUUID: /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/,
|
||||
randomNanoId: /^[\w-]{21,}$/,
|
||||
randomAlphaNumeric: /^[\w]$/,
|
||||
randomBoolean: /^(true|false)$/,
|
||||
randomInt: /^\d+$/,
|
||||
|
||||
@@ -5,6 +5,7 @@ export const mockDataFunctions = {
|
||||
timestamp: () => Math.floor(Date.now() / 1000).toString(),
|
||||
isoTimestamp: () => new Date().toISOString(),
|
||||
randomUUID: () => faker.string.uuid(),
|
||||
randomNanoId: () => faker.string.nanoid(),
|
||||
randomAlphaNumeric: () => faker.string.alphanumeric(),
|
||||
randomBoolean: () => faker.datatype.boolean(),
|
||||
randomInt: () => faker.number.int(),
|
||||
|
||||
Reference in New Issue
Block a user