diff --git a/example/index.ts b/example/index.ts index ee8cd778..00624abb 100644 --- a/example/index.ts +++ b/example/index.ts @@ -5,23 +5,3 @@ import { Parse, StaticParseAsType } from '@sinclair/typebox/syntax' import { Type, TypeGuard, Kind, Static, TSchema } from '@sinclair/typebox' const A = Type.String({ format: 'ipv4' }) - -const S = "!#$%&'*+/=?^_`{|}~-" - -function shuffleString(str: string) { - // Convert the string into an array of characters - const arr = str.split('') - - // Fisher-Yates (or Knuth) shuffle algorithm - for (let i = arr.length - 1; i > 0; i--) { - const j = Math.floor(Math.random() * (i + 1)) - - // Swap the elements at index i and j - ;[arr[i], arr[j]] = [arr[j], arr[i]] - } - - // Join the array back into a string and return it - return arr.join('') -} - -console.log(shuffleString(S))