Skip to content

Method catalog

The full catalog is generated from prompts.json. Every wrapper exposed by neuro-ts is listed below, grouped by built-in. Click through to the full method catalog for full type signatures.

array (40)

  • neuro.array.at
  • neuro.array.concat
  • neuro.array.copyWithin
  • neuro.array.entries
  • neuro.array.every
  • neuro.array.fill
  • neuro.array.filter
  • neuro.array.find
  • neuro.array.findIndex
  • neuro.array.findLast
  • neuro.array.findLastIndex
  • neuro.array.flat
  • neuro.array.flatMap
  • neuro.array.forEach
  • neuro.array.from
  • neuro.array.fromAsync
  • neuro.array.includes
  • neuro.array.indexOf
  • neuro.array.isArray
  • neuro.array.join
  • neuro.array.keys
  • neuro.array.lastIndexOf
  • neuro.array.map
  • neuro.array.of
  • neuro.array.pop
  • neuro.array.push
  • neuro.array.reduce
  • neuro.array.reduceRight
  • neuro.array.reverse
  • neuro.array.shift
  • neuro.array.slice
  • neuro.array.some
  • neuro.array.sort
  • neuro.array.splice
  • neuro.array.toReversed
  • neuro.array.toSorted
  • neuro.array.toSpliced
  • neuro.array.unshift
  • neuro.array.values
  • neuro.array.with

arrayBuffer (5)

  • neuro.arrayBuffer.isView
  • neuro.arrayBuffer.resize
  • neuro.arrayBuffer.slice
  • neuro.arrayBuffer.transfer
  • neuro.arrayBuffer.transferToFixedLength

atomics (14)

  • neuro.atomics.add
  • neuro.atomics.and
  • neuro.atomics.compareExchange
  • neuro.atomics.exchange
  • neuro.atomics.isLockFree
  • neuro.atomics.load
  • neuro.atomics.notify
  • neuro.atomics.or
  • neuro.atomics.pause
  • neuro.atomics.store
  • neuro.atomics.sub
  • neuro.atomics.wait
  • neuro.atomics.waitAsync
  • neuro.atomics.xor

bigInt (2)

  • neuro.bigInt.asIntN
  • neuro.bigInt.asUintN

bigInt64Array (31)

  • neuro.bigInt64Array.at
  • neuro.bigInt64Array.copyWithin
  • neuro.bigInt64Array.entries
  • neuro.bigInt64Array.every
  • neuro.bigInt64Array.fill
  • neuro.bigInt64Array.filter
  • neuro.bigInt64Array.find
  • neuro.bigInt64Array.findIndex
  • neuro.bigInt64Array.findLast
  • neuro.bigInt64Array.findLastIndex
  • neuro.bigInt64Array.forEach
  • neuro.bigInt64Array.from
  • neuro.bigInt64Array.includes
  • neuro.bigInt64Array.indexOf
  • neuro.bigInt64Array.join
  • neuro.bigInt64Array.keys
  • neuro.bigInt64Array.lastIndexOf
  • neuro.bigInt64Array.map
  • neuro.bigInt64Array.of
  • neuro.bigInt64Array.reduce
  • neuro.bigInt64Array.reduceRight
  • neuro.bigInt64Array.reverse
  • neuro.bigInt64Array.set
  • neuro.bigInt64Array.slice
  • neuro.bigInt64Array.some
  • neuro.bigInt64Array.sort
  • neuro.bigInt64Array.subarray
  • neuro.bigInt64Array.toReversed
  • neuro.bigInt64Array.toSorted
  • neuro.bigInt64Array.values
  • neuro.bigInt64Array.with

bigUint64Array (31)

  • neuro.bigUint64Array.at
  • neuro.bigUint64Array.copyWithin
  • neuro.bigUint64Array.entries
  • neuro.bigUint64Array.every
  • neuro.bigUint64Array.fill
  • neuro.bigUint64Array.filter
  • neuro.bigUint64Array.find
  • neuro.bigUint64Array.findIndex
  • neuro.bigUint64Array.findLast
  • neuro.bigUint64Array.findLastIndex
  • neuro.bigUint64Array.forEach
  • neuro.bigUint64Array.from
  • neuro.bigUint64Array.includes
  • neuro.bigUint64Array.indexOf
  • neuro.bigUint64Array.join
  • neuro.bigUint64Array.keys
  • neuro.bigUint64Array.lastIndexOf
  • neuro.bigUint64Array.map
  • neuro.bigUint64Array.of
  • neuro.bigUint64Array.reduce
  • neuro.bigUint64Array.reduceRight
  • neuro.bigUint64Array.reverse
  • neuro.bigUint64Array.set
  • neuro.bigUint64Array.slice
  • neuro.bigUint64Array.some
  • neuro.bigUint64Array.sort
  • neuro.bigUint64Array.subarray
  • neuro.bigUint64Array.toReversed
  • neuro.bigUint64Array.toSorted
  • neuro.bigUint64Array.values
  • neuro.bigUint64Array.with

dataView (22)

  • neuro.dataView.getBigInt64
  • neuro.dataView.getBigUint64
  • neuro.dataView.getFloat16
  • neuro.dataView.getFloat32
  • neuro.dataView.getFloat64
  • neuro.dataView.getInt16
  • neuro.dataView.getInt32
  • neuro.dataView.getInt8
  • neuro.dataView.getUint16
  • neuro.dataView.getUint32
  • neuro.dataView.getUint8
  • neuro.dataView.setBigInt64
  • neuro.dataView.setBigUint64
  • neuro.dataView.setFloat16
  • neuro.dataView.setFloat32
  • neuro.dataView.setFloat64
  • neuro.dataView.setInt16
  • neuro.dataView.setInt32
  • neuro.dataView.setInt8
  • neuro.dataView.setUint16
  • neuro.dataView.setUint32
  • neuro.dataView.setUint8

date (43)

  • neuro.date.UTC
  • neuro.date.getDate
  • neuro.date.getDay
  • neuro.date.getFullYear
  • neuro.date.getHours
  • neuro.date.getMilliseconds
  • neuro.date.getMinutes
  • neuro.date.getMonth
  • neuro.date.getSeconds
  • neuro.date.getTime
  • neuro.date.getTimezoneOffset
  • neuro.date.getUTCDate
  • neuro.date.getUTCDay
  • neuro.date.getUTCFullYear
  • neuro.date.getUTCHours
  • neuro.date.getUTCMilliseconds
  • neuro.date.getUTCMinutes
  • neuro.date.getUTCMonth
  • neuro.date.getUTCSeconds
  • neuro.date.now
  • neuro.date.parse
  • neuro.date.setDate
  • neuro.date.setFullYear
  • neuro.date.setHours
  • neuro.date.setMilliseconds
  • neuro.date.setMinutes
  • neuro.date.setMonth
  • neuro.date.setSeconds
  • neuro.date.setTime
  • neuro.date.setUTCDate
  • neuro.date.setUTCFullYear
  • neuro.date.setUTCHours
  • neuro.date.setUTCMilliseconds
  • neuro.date.setUTCMinutes
  • neuro.date.setUTCMonth
  • neuro.date.setUTCSeconds
  • neuro.date.toDateString
  • neuro.date.toISOString
  • neuro.date.toJSON
  • neuro.date.toLocaleDateString
  • neuro.date.toLocaleTimeString
  • neuro.date.toTimeString
  • neuro.date.toUTCString

error (1)

  • neuro.error.isError

float32Array (31)

  • neuro.float32Array.at
  • neuro.float32Array.copyWithin
  • neuro.float32Array.entries
  • neuro.float32Array.every
  • neuro.float32Array.fill
  • neuro.float32Array.filter
  • neuro.float32Array.find
  • neuro.float32Array.findIndex
  • neuro.float32Array.findLast
  • neuro.float32Array.findLastIndex
  • neuro.float32Array.forEach
  • neuro.float32Array.from
  • neuro.float32Array.includes
  • neuro.float32Array.indexOf
  • neuro.float32Array.join
  • neuro.float32Array.keys
  • neuro.float32Array.lastIndexOf
  • neuro.float32Array.map
  • neuro.float32Array.of
  • neuro.float32Array.reduce
  • neuro.float32Array.reduceRight
  • neuro.float32Array.reverse
  • neuro.float32Array.set
  • neuro.float32Array.slice
  • neuro.float32Array.some
  • neuro.float32Array.sort
  • neuro.float32Array.subarray
  • neuro.float32Array.toReversed
  • neuro.float32Array.toSorted
  • neuro.float32Array.values
  • neuro.float32Array.with

float64Array (31)

  • neuro.float64Array.at
  • neuro.float64Array.copyWithin
  • neuro.float64Array.entries
  • neuro.float64Array.every
  • neuro.float64Array.fill
  • neuro.float64Array.filter
  • neuro.float64Array.find
  • neuro.float64Array.findIndex
  • neuro.float64Array.findLast
  • neuro.float64Array.findLastIndex
  • neuro.float64Array.forEach
  • neuro.float64Array.from
  • neuro.float64Array.includes
  • neuro.float64Array.indexOf
  • neuro.float64Array.join
  • neuro.float64Array.keys
  • neuro.float64Array.lastIndexOf
  • neuro.float64Array.map
  • neuro.float64Array.of
  • neuro.float64Array.reduce
  • neuro.float64Array.reduceRight
  • neuro.float64Array.reverse
  • neuro.float64Array.set
  • neuro.float64Array.slice
  • neuro.float64Array.some
  • neuro.float64Array.sort
  • neuro.float64Array.subarray
  • neuro.float64Array.toReversed
  • neuro.float64Array.toSorted
  • neuro.float64Array.values
  • neuro.float64Array.with

globals (11)

  • neuro.atob
  • neuro.btoa
  • neuro.decodeURI
  • neuro.decodeURIComponent
  • neuro.encodeURI
  • neuro.encodeURIComponent
  • neuro.isFinite
  • neuro.isNaN
  • neuro.parseFloat
  • neuro.parseInt
  • neuro.structuredClone

int16Array (31)

  • neuro.int16Array.at
  • neuro.int16Array.copyWithin
  • neuro.int16Array.entries
  • neuro.int16Array.every
  • neuro.int16Array.fill
  • neuro.int16Array.filter
  • neuro.int16Array.find
  • neuro.int16Array.findIndex
  • neuro.int16Array.findLast
  • neuro.int16Array.findLastIndex
  • neuro.int16Array.forEach
  • neuro.int16Array.from
  • neuro.int16Array.includes
  • neuro.int16Array.indexOf
  • neuro.int16Array.join
  • neuro.int16Array.keys
  • neuro.int16Array.lastIndexOf
  • neuro.int16Array.map
  • neuro.int16Array.of
  • neuro.int16Array.reduce
  • neuro.int16Array.reduceRight
  • neuro.int16Array.reverse
  • neuro.int16Array.set
  • neuro.int16Array.slice
  • neuro.int16Array.some
  • neuro.int16Array.sort
  • neuro.int16Array.subarray
  • neuro.int16Array.toReversed
  • neuro.int16Array.toSorted
  • neuro.int16Array.values
  • neuro.int16Array.with

int32Array (31)

  • neuro.int32Array.at
  • neuro.int32Array.copyWithin
  • neuro.int32Array.entries
  • neuro.int32Array.every
  • neuro.int32Array.fill
  • neuro.int32Array.filter
  • neuro.int32Array.find
  • neuro.int32Array.findIndex
  • neuro.int32Array.findLast
  • neuro.int32Array.findLastIndex
  • neuro.int32Array.forEach
  • neuro.int32Array.from
  • neuro.int32Array.includes
  • neuro.int32Array.indexOf
  • neuro.int32Array.join
  • neuro.int32Array.keys
  • neuro.int32Array.lastIndexOf
  • neuro.int32Array.map
  • neuro.int32Array.of
  • neuro.int32Array.reduce
  • neuro.int32Array.reduceRight
  • neuro.int32Array.reverse
  • neuro.int32Array.set
  • neuro.int32Array.slice
  • neuro.int32Array.some
  • neuro.int32Array.sort
  • neuro.int32Array.subarray
  • neuro.int32Array.toReversed
  • neuro.int32Array.toSorted
  • neuro.int32Array.values
  • neuro.int32Array.with

int8Array (31)

  • neuro.int8Array.at
  • neuro.int8Array.copyWithin
  • neuro.int8Array.entries
  • neuro.int8Array.every
  • neuro.int8Array.fill
  • neuro.int8Array.filter
  • neuro.int8Array.find
  • neuro.int8Array.findIndex
  • neuro.int8Array.findLast
  • neuro.int8Array.findLastIndex
  • neuro.int8Array.forEach
  • neuro.int8Array.from
  • neuro.int8Array.includes
  • neuro.int8Array.indexOf
  • neuro.int8Array.join
  • neuro.int8Array.keys
  • neuro.int8Array.lastIndexOf
  • neuro.int8Array.map
  • neuro.int8Array.of
  • neuro.int8Array.reduce
  • neuro.int8Array.reduceRight
  • neuro.int8Array.reverse
  • neuro.int8Array.set
  • neuro.int8Array.slice
  • neuro.int8Array.some
  • neuro.int8Array.sort
  • neuro.int8Array.subarray
  • neuro.int8Array.toReversed
  • neuro.int8Array.toSorted
  • neuro.int8Array.values
  • neuro.int8Array.with

iterator (15)

  • neuro.iterator.drop
  • neuro.iterator.every
  • neuro.iterator.filter
  • neuro.iterator.find
  • neuro.iterator.flatMap
  • neuro.iterator.forEach
  • neuro.iterator.from
  • neuro.iterator.map
  • neuro.iterator.next
  • neuro.iterator.reduce
  • neuro.iterator.return
  • neuro.iterator.some
  • neuro.iterator.take
  • neuro.iterator.throw
  • neuro.iterator.toArray

json (2)

  • neuro.json.parse
  • neuro.json.stringify

map (12)

  • neuro.map.clear
  • neuro.map.delete
  • neuro.map.entries
  • neuro.map.forEach
  • neuro.map.get
  • neuro.map.getOrInsert
  • neuro.map.getOrInsertComputed
  • neuro.map.groupBy
  • neuro.map.has
  • neuro.map.keys
  • neuro.map.set
  • neuro.map.values

math (36)

  • neuro.math.abs
  • neuro.math.acos
  • neuro.math.acosh
  • neuro.math.asin
  • neuro.math.asinh
  • neuro.math.atan
  • neuro.math.atan2
  • neuro.math.atanh
  • neuro.math.cbrt
  • neuro.math.ceil
  • neuro.math.clz32
  • neuro.math.cos
  • neuro.math.cosh
  • neuro.math.exp
  • neuro.math.expm1
  • neuro.math.f16round
  • neuro.math.floor
  • neuro.math.fround
  • neuro.math.hypot
  • neuro.math.imul
  • neuro.math.log
  • neuro.math.log10
  • neuro.math.log1p
  • neuro.math.log2
  • neuro.math.max
  • neuro.math.min
  • neuro.math.pow
  • neuro.math.random
  • neuro.math.round
  • neuro.math.sign
  • neuro.math.sin
  • neuro.math.sinh
  • neuro.math.sqrt
  • neuro.math.tan
  • neuro.math.tanh
  • neuro.math.trunc

number (9)

  • neuro.number.isFinite
  • neuro.number.isInteger
  • neuro.number.isNaN
  • neuro.number.isSafeInteger
  • neuro.number.parseFloat
  • neuro.number.parseInt
  • neuro.number.toExponential
  • neuro.number.toFixed
  • neuro.number.toPrecision

object (23)

  • neuro.object.assign
  • neuro.object.create
  • neuro.object.defineProperties
  • neuro.object.defineProperty
  • neuro.object.entries
  • neuro.object.freeze
  • neuro.object.fromEntries
  • neuro.object.getOwnPropertyDescriptor
  • neuro.object.getOwnPropertyDescriptors
  • neuro.object.getOwnPropertyNames
  • neuro.object.getOwnPropertySymbols
  • neuro.object.getPrototypeOf
  • neuro.object.groupBy
  • neuro.object.hasOwn
  • neuro.object.is
  • neuro.object.isExtensible
  • neuro.object.isFrozen
  • neuro.object.isSealed
  • neuro.object.keys
  • neuro.object.preventExtensions
  • neuro.object.seal
  • neuro.object.setPrototypeOf
  • neuro.object.values

promise (11)

  • neuro.promise.all
  • neuro.promise.allSettled
  • neuro.promise.any
  • neuro.promise.catch
  • neuro.promise.finally
  • neuro.promise.race
  • neuro.promise.reject
  • neuro.promise.resolve
  • neuro.promise.then
  • neuro.promise.try
  • neuro.promise.withResolvers

regExp (3)

  • neuro.regExp.compile
  • neuro.regExp.exec
  • neuro.regExp.test

set (15)

  • neuro.set.add
  • neuro.set.clear
  • neuro.set.delete
  • neuro.set.difference
  • neuro.set.entries
  • neuro.set.forEach
  • neuro.set.has
  • neuro.set.intersection
  • neuro.set.isDisjointFrom
  • neuro.set.isSubsetOf
  • neuro.set.isSupersetOf
  • neuro.set.keys
  • neuro.set.symmetricDifference
  • neuro.set.union
  • neuro.set.values

string (51)

  • neuro.string.anchor
  • neuro.string.at
  • neuro.string.big
  • neuro.string.blink
  • neuro.string.bold
  • neuro.string.charAt
  • neuro.string.charCodeAt
  • neuro.string.codePointAt
  • neuro.string.concat
  • neuro.string.endsWith
  • neuro.string.fixed
  • neuro.string.fontcolor
  • neuro.string.fontsize
  • neuro.string.fromCharCode
  • neuro.string.fromCodePoint
  • neuro.string.includes
  • neuro.string.indexOf
  • neuro.string.isWellFormed
  • neuro.string.italics
  • neuro.string.lastIndexOf
  • neuro.string.link
  • neuro.string.localeCompare
  • neuro.string.match
  • neuro.string.matchAll
  • neuro.string.normalize
  • neuro.string.padEnd
  • neuro.string.padStart
  • neuro.string.raw
  • neuro.string.repeat
  • neuro.string.replace
  • neuro.string.replaceAll
  • neuro.string.search
  • neuro.string.slice
  • neuro.string.small
  • neuro.string.split
  • neuro.string.startsWith
  • neuro.string.strike
  • neuro.string.sub
  • neuro.string.substr
  • neuro.string.substring
  • neuro.string.sup
  • neuro.string.toLocaleLowerCase
  • neuro.string.toLocaleUpperCase
  • neuro.string.toLowerCase
  • neuro.string.toUpperCase
  • neuro.string.toWellFormed
  • neuro.string.trim
  • neuro.string.trimEnd
  • neuro.string.trimLeft
  • neuro.string.trimRight
  • neuro.string.trimStart

symbol (2)

  • neuro.symbol.for
  • neuro.symbol.keyFor

uint16Array (31)

  • neuro.uint16Array.at
  • neuro.uint16Array.copyWithin
  • neuro.uint16Array.entries
  • neuro.uint16Array.every
  • neuro.uint16Array.fill
  • neuro.uint16Array.filter
  • neuro.uint16Array.find
  • neuro.uint16Array.findIndex
  • neuro.uint16Array.findLast
  • neuro.uint16Array.findLastIndex
  • neuro.uint16Array.forEach
  • neuro.uint16Array.from
  • neuro.uint16Array.includes
  • neuro.uint16Array.indexOf
  • neuro.uint16Array.join
  • neuro.uint16Array.keys
  • neuro.uint16Array.lastIndexOf
  • neuro.uint16Array.map
  • neuro.uint16Array.of
  • neuro.uint16Array.reduce
  • neuro.uint16Array.reduceRight
  • neuro.uint16Array.reverse
  • neuro.uint16Array.set
  • neuro.uint16Array.slice
  • neuro.uint16Array.some
  • neuro.uint16Array.sort
  • neuro.uint16Array.subarray
  • neuro.uint16Array.toReversed
  • neuro.uint16Array.toSorted
  • neuro.uint16Array.values
  • neuro.uint16Array.with

uint32Array (31)

  • neuro.uint32Array.at
  • neuro.uint32Array.copyWithin
  • neuro.uint32Array.entries
  • neuro.uint32Array.every
  • neuro.uint32Array.fill
  • neuro.uint32Array.filter
  • neuro.uint32Array.find
  • neuro.uint32Array.findIndex
  • neuro.uint32Array.findLast
  • neuro.uint32Array.findLastIndex
  • neuro.uint32Array.forEach
  • neuro.uint32Array.from
  • neuro.uint32Array.includes
  • neuro.uint32Array.indexOf
  • neuro.uint32Array.join
  • neuro.uint32Array.keys
  • neuro.uint32Array.lastIndexOf
  • neuro.uint32Array.map
  • neuro.uint32Array.of
  • neuro.uint32Array.reduce
  • neuro.uint32Array.reduceRight
  • neuro.uint32Array.reverse
  • neuro.uint32Array.set
  • neuro.uint32Array.slice
  • neuro.uint32Array.some
  • neuro.uint32Array.sort
  • neuro.uint32Array.subarray
  • neuro.uint32Array.toReversed
  • neuro.uint32Array.toSorted
  • neuro.uint32Array.values
  • neuro.uint32Array.with

uint8Array (37)

  • neuro.uint8Array.at
  • neuro.uint8Array.copyWithin
  • neuro.uint8Array.entries
  • neuro.uint8Array.every
  • neuro.uint8Array.fill
  • neuro.uint8Array.filter
  • neuro.uint8Array.find
  • neuro.uint8Array.findIndex
  • neuro.uint8Array.findLast
  • neuro.uint8Array.findLastIndex
  • neuro.uint8Array.forEach
  • neuro.uint8Array.from
  • neuro.uint8Array.fromBase64
  • neuro.uint8Array.fromHex
  • neuro.uint8Array.includes
  • neuro.uint8Array.indexOf
  • neuro.uint8Array.join
  • neuro.uint8Array.keys
  • neuro.uint8Array.lastIndexOf
  • neuro.uint8Array.map
  • neuro.uint8Array.of
  • neuro.uint8Array.reduce
  • neuro.uint8Array.reduceRight
  • neuro.uint8Array.reverse
  • neuro.uint8Array.set
  • neuro.uint8Array.setFromBase64
  • neuro.uint8Array.setFromHex
  • neuro.uint8Array.slice
  • neuro.uint8Array.some
  • neuro.uint8Array.sort
  • neuro.uint8Array.subarray
  • neuro.uint8Array.toBase64
  • neuro.uint8Array.toHex
  • neuro.uint8Array.toReversed
  • neuro.uint8Array.toSorted
  • neuro.uint8Array.values
  • neuro.uint8Array.with

uint8ClampedArray (31)

  • neuro.uint8ClampedArray.at
  • neuro.uint8ClampedArray.copyWithin
  • neuro.uint8ClampedArray.entries
  • neuro.uint8ClampedArray.every
  • neuro.uint8ClampedArray.fill
  • neuro.uint8ClampedArray.filter
  • neuro.uint8ClampedArray.find
  • neuro.uint8ClampedArray.findIndex
  • neuro.uint8ClampedArray.findLast
  • neuro.uint8ClampedArray.findLastIndex
  • neuro.uint8ClampedArray.forEach
  • neuro.uint8ClampedArray.from
  • neuro.uint8ClampedArray.includes
  • neuro.uint8ClampedArray.indexOf
  • neuro.uint8ClampedArray.join
  • neuro.uint8ClampedArray.keys
  • neuro.uint8ClampedArray.lastIndexOf
  • neuro.uint8ClampedArray.map
  • neuro.uint8ClampedArray.of
  • neuro.uint8ClampedArray.reduce
  • neuro.uint8ClampedArray.reduceRight
  • neuro.uint8ClampedArray.reverse
  • neuro.uint8ClampedArray.set
  • neuro.uint8ClampedArray.slice
  • neuro.uint8ClampedArray.some
  • neuro.uint8ClampedArray.sort
  • neuro.uint8ClampedArray.subarray
  • neuro.uint8ClampedArray.toReversed
  • neuro.uint8ClampedArray.toSorted
  • neuro.uint8ClampedArray.values
  • neuro.uint8ClampedArray.with

weakMap (6)

  • neuro.weakMap.delete
  • neuro.weakMap.get
  • neuro.weakMap.getOrInsert
  • neuro.weakMap.getOrInsertComputed
  • neuro.weakMap.has
  • neuro.weakMap.set

weakSet (3)

  • neuro.weakSet.add
  • neuro.weakSet.delete
  • neuro.weakSet.has

One representative prompt per group showing the kind of instruction you can pass to steer the LLM. These are the curated prompts shipped in prompts.json — the same text that appears in each method’s docs page.

Generated promptArray.prototype.filter
You are simulating the JavaScript built-in `Array.prototype.filter`.
## Original signature(s)
  Overload 1: (predicate?: (value: T, index: number, array: T[]) => boolean, thisArg?: any) => S[]
  Overload 2: (predicate?: (value: T, index: number, array: T[]) => unknown, thisArg?: any) => T[]
## JSDoc
Returns the elements of an array that meet the condition specified in a callback function.

## How to respond
- Behave EXACTLY as the original `filter` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptString.prototype.replace
You are simulating the JavaScript built-in `String.prototype.replace`.
## Original signature(s)
  Overload 1: (searchValue: string | RegExp, replaceValue: string) => string
  Overload 2: (searchValue: string | RegExp, replacer?: (substring: string, ...args: any[]) => string) => string
  Overload 3: (searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string) => string
  Overload 4: (searchValue?: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer?: (substring: string, ...args: any[]) => string) => string
## JSDoc
Replaces text in a string, using a regular expression or search string.

## How to respond
- Behave EXACTLY as the original `replace` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptMath.random
You are simulating the JavaScript built-in `Math.random`.
## Original signature(s)
  Overload 1: () => number
## JSDoc
Returns a pseudorandom number between 0 and 1.

## How to respond
- Behave EXACTLY as the original `random` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptNumber.prototype.toFixed
You are simulating the JavaScript built-in `Number.prototype.toFixed`.
## Original signature(s)
  Overload 1: (fractionDigits?: number) => string
## JSDoc
Returns a string representing a number in fixed-point notation.

## How to respond
- Behave EXACTLY as the original `toFixed` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptJSON.parse
You are simulating the JavaScript built-in `JSON.parse`.
## Original signature(s)
  Overload 1: (text: string, reviver?: (this: any, key: string, value: any) => any) => any
## JSDoc
Converts a JavaScript Object Notation (JSON) string into an object.

## How to respond
- Behave EXACTLY as the original `parse` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptObject.freeze
You are simulating the JavaScript built-in `Object.freeze`.
## Original signature(s)
  Overload 1: (f: T) => T
  Overload 2: (o: T) => Readonly<T>
  Overload 3: (o: T) => Readonly<T>
## JSDoc
Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

## How to respond
- Behave EXACTLY as the original `freeze` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptDate.prototype.getMonth
You are simulating the JavaScript built-in `Date.prototype.getMonth`.
## Original signature(s)
  Overload 1: () => number
## JSDoc
Gets the month, using local time.

## How to respond
- Behave EXACTLY as the original `getMonth` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptRegExp.prototype.exec
You are simulating the JavaScript built-in `RegExp.prototype.exec`.
## Original signature(s)
  Overload 1: (string: string) => RegExpExecArray
## JSDoc
Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.

## How to respond
- Behave EXACTLY as the original `exec` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptMap.groupBy
You are simulating the JavaScript built-in `Map.groupBy`.
## Original signature(s)
  Overload 1: (items: Iterable<T>, keySelector?: (item: T, index: number) => K) => Map<K, T[]>
## JSDoc
Groups members of an iterable according to the return value of the passed callback.

## How to respond
- Behave EXACTLY as the original `groupBy` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptSet.prototype.intersection
You are simulating the JavaScript built-in `Set.prototype.intersection`.
## Original signature(s)
  Overload 1: (other: ReadonlySetLike<U>) => Set<T & U>
## How to respond
- Behave EXACTLY as the original `intersection` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptWeakMap.prototype.get
You are simulating the JavaScript built-in `WeakMap.prototype.get`.
## Original signature(s)
  Overload 1: (key: K) => V
## How to respond
- Behave EXACTLY as the original `get` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptWeakSet.prototype.has
You are simulating the JavaScript built-in `WeakSet.prototype.has`.
## Original signature(s)
  Overload 1: (value: T) => boolean
## How to respond
- Behave EXACTLY as the original `has` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptPromise.all
You are simulating the JavaScript built-in `Promise.all`.
## Original signature(s)
  Overload 1: (values: Iterable<T | PromiseLike<T>>) => Promise<Awaited<T>[]>
  Overload 2: (values: T) => Promise<{ -readonly [P in keyof T]: Awaited<T[P]>; }>
## JSDoc
Creates a Promise that is resolved with an array of results when all of the provided Promises
resolve, or rejected when any Promise is rejected.

## How to respond
- Behave EXACTLY as the original `all` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptSymbol.for
You are simulating the JavaScript built-in `Symbol.for`.
## Original signature(s)
  Overload 1: (key: string) => symbol
## JSDoc
Returns a Symbol object from the global symbol registry matching the given key if found.
Otherwise, returns a new symbol with this key.

## How to respond
- Behave EXACTLY as the original `for` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptBigInt.asIntN
You are simulating the JavaScript built-in `BigInt.asIntN`.
## Original signature(s)
  Overload 1: (bits: number, int: bigint) => bigint
## JSDoc
Interprets the low bits of a BigInt as a 2's-complement signed integer.
All higher bits are discarded.

## How to respond
- Behave EXACTLY as the original `asIntN` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptArrayBuffer.prototype.transfer
You are simulating the JavaScript built-in `ArrayBuffer.prototype.transfer`.
## Original signature(s)
  Overload 1: (newByteLength?: number) => ArrayBuffer
## JSDoc
Creates a new ArrayBuffer with the same byte content as this buffer, then detaches this buffer.

[MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transfer)

## How to respond
- Behave EXACTLY as the original `transfer` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptDataView.prototype.getFloat64
You are simulating the JavaScript built-in `DataView.prototype.getFloat64`.
## Original signature(s)
  Overload 1: (byteOffset: number, littleEndian?: boolean) => number
## JSDoc
Gets the Float64 value at the specified byte offset from the start of the view. There is
no alignment constraint; multi-byte values may be fetched from any offset.

## How to respond
- Behave EXACTLY as the original `getFloat64` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptAtomics.compareExchange
You are simulating the JavaScript built-in `Atomics.compareExchange`.
## Original signature(s)
  Overload 1: (typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number) => number
  Overload 2: (typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint) => bigint
## JSDoc
Replaces the value at the given position in the array if the original value equals the given
expected value, returning the original value. Until this atomic operation completes, any
other read or write operation against the array will block.

## How to respond
- Behave EXACTLY as the original `compareExchange` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptInt8Array.prototype.fill
You are simulating the JavaScript built-in `Int8Array.prototype.fill`.
## Original signature(s)
  Overload 1: (value: number, start?: number, end?: number) => Int8Array
## JSDoc
Changes all array elements from `start` to `end` index to a static `value` and returns the modified array

## How to respond
- Behave EXACTLY as the original `fill` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptUint8Array.prototype.toBase64
You are simulating the JavaScript built-in `Uint8Array.prototype.toBase64`.
## Original signature(s)
  Overload 1: (options?: { alphabet?: "base64" | "base64url" | undefined; omitPadding?: boolean | undefined; }) => string
## JSDoc
Converts the `Uint8Array` to a base64-encoded string.

## How to respond
- Behave EXACTLY as the original `toBase64` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptUint8ClampedArray.prototype.filter
You are simulating the JavaScript built-in `Uint8ClampedArray.prototype.filter`.
## Original signature(s)
  Overload 1: (predicate?: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any) => Uint8ClampedArray
## JSDoc
Returns the elements of an array that meet the condition specified in a callback function.

## How to respond
- Behave EXACTLY as the original `filter` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptInt16Array.prototype.sort
You are simulating the JavaScript built-in `Int16Array.prototype.sort`.
## Original signature(s)
  Overload 1: (compareFn?: (a: number, b: number) => number) => Int16Array
## JSDoc
Sorts an array.

## How to respond
- Behave EXACTLY as the original `sort` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptUint16Array.prototype.indexOf
You are simulating the JavaScript built-in `Uint16Array.prototype.indexOf`.
## Original signature(s)
  Overload 1: (searchElement: number, fromIndex?: number) => number
## JSDoc
Returns the index of the first occurrence of a value in an array, or -1 if it is not present.

## How to respond
- Behave EXACTLY as the original `indexOf` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptInt32Array.prototype.reduce
You are simulating the JavaScript built-in `Int32Array.prototype.reduce`.
## Original signature(s)
  Overload 1: (callbackfn?: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number) => number
  Overload 2: (callbackfn?: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number) => number
  Overload 3: (callbackfn?: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue?: U) => U
## JSDoc
Calls the specified callback function for all the elements in an array. The return value of
the callback function is the accumulated result, and is provided as an argument in the next
call to the callback function.

## How to respond
- Behave EXACTLY as the original `reduce` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptUint32Array.prototype.set
You are simulating the JavaScript built-in `Uint32Array.prototype.set`.
## Original signature(s)
  Overload 1: (array: ArrayLike<number>, offset?: number) => void
## JSDoc
Sets a value or an array of values.

## How to respond
- Behave EXACTLY as the original `set` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptFloat32Array.prototype.map
You are simulating the JavaScript built-in `Float32Array.prototype.map`.
## Original signature(s)
  Overload 1: (callbackfn?: (value: number, index: number, array: Float32Array) => number, thisArg?: any) => Float32Array
## JSDoc
Calls a defined callback function on each element of an array, and returns an array that
contains the results.

## How to respond
- Behave EXACTLY as the original `map` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptFloat64Array.prototype.find
You are simulating the JavaScript built-in `Float64Array.prototype.find`.
## Original signature(s)
  Overload 1: (predicate?: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any) => number
## JSDoc
Returns the value of the first element in the array where predicate is true, and undefined
otherwise.

## How to respond
- Behave EXACTLY as the original `find` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptBigInt64Array.prototype.reduce
You are simulating the JavaScript built-in `BigInt64Array.prototype.reduce`.
## Original signature(s)
  Overload 1: (callbackfn?: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint) => bigint
  Overload 2: (callbackfn?: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue?: U) => U
## JSDoc
Calls the specified callback function for all the elements in an array. The return value of
the callback function is the accumulated result, and is provided as an argument in the next
call to the callback function.

## How to respond
- Behave EXACTLY as the original `reduce` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptBigUint64Array.prototype.set
You are simulating the JavaScript built-in `BigUint64Array.prototype.set`.
## Original signature(s)
  Overload 1: (array: ArrayLike<bigint>, offset?: number) => void
## JSDoc
Sets a value or an array of values.

## How to respond
- Behave EXACTLY as the original `set` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptglobalThis.encodeURIComponent
You are simulating the JavaScript built-in `globalThis.encodeURIComponent`.
## Original signature(s)
  Overload 1: (uriComponent: string | number | boolean) => string
## JSDoc
Encodes a text string as a valid component of a Uniform Resource Identifier (URI).

## How to respond
- Behave EXACTLY as the original `encodeURIComponent` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptIterator.prototype.map
You are simulating the JavaScript built-in `Iterator.prototype.map`.
## Original signature(s)
  Overload 1: (callbackfn?: (value: T, index: number) => U) => IteratorObject<U, undefined, unknown>
## JSDoc
Creates an iterator whose values are the result of applying the callback to the values from this iterator.

## How to respond
- Behave EXACTLY as the original `map` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.
Generated promptError.isError
You are simulating the JavaScript built-in `Error.isError`.
## Original signature(s)
  Overload 1: (error: unknown) => boolean
## JSDoc
Indicates whether the argument provided is a built-in Error instance or not.

## How to respond
- Behave EXACTLY as the original `isError` would, but use the user's intent to choose any callback / comparator / transform logic that the original would normally accept as an argument.
- Strictly preserve the original return type and shape.
- Output ONLY the JSON-encoded return value of the function call.
- Do NOT include explanations, prose, comments, or markdown fences.
- If the function would return `undefined`, output the literal string `undefined`.
- For Date / RegExp / Map / Set / TypedArray returns, output an object of the form { "__type": "Date" | "RegExp" | "Map" | "Set" | "<TypedArrayName>", ... } so the SDK can rehydrate it.