Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/denoland/std
/ functions
Functions
2,890 in github.com/denoland/std
⨍
Functions
2,890
◇
Types & classes
637
↓ 2 callers
Function
retry
( fn: (() => Promise<T>) | (() => T), options?: RetryOptions, )
async/retry.ts:165
↓ 2 callers
Function
returnsNext
( values: Iterable<Return | Error>, )
testing/mock.ts:1732
↓ 2 callers
Method
rnlValues
* Create an iterator over this tree that traverses the tree in reverse * in-order (RNL, Right-Node-Left). * * @example Using the reverse in-o
data_structures/binary_search_tree.ts:632
↓ 2 callers
Method
rotate
* Advances the window by `steps`, dropping the oldest segments. If `steps` * is at least {@linkcode segmentCount}, all segments are cleared. *
data_structures/unstable_rolling_counter.ts:276
↓ 2 callers
Method
roundFractionToPrecision
* Round fraction to precision * @param fractional * @param precision * @returns tuple of fractional and round
fmt/printf.ts:687
↓ 2 callers
Function
routeLinear
( routes: Route[], defaultHandler: RequestHandler, )
http/unstable_route.ts:99
↓ 2 callers
Method
runAllAsync
* Advances time forward to the next due timer until there are no pending timers remaining. * If the timers create additional timers, they will be r
testing/time.ts:806
↓ 2 callers
Function
runLengthEncode
(arr: number[])
cli/_run_length.ts:3
↓ 2 callers
Function
sameValueZero
Check both strict equality (`0 == -0`) and `Object.is` (`NaN == NaN`)
assert/equal.ts:85
↓ 2 callers
Function
sample
( array: ArrayLike<T>, options?: SampleOptions, )
random/sample.ts:56
↓ 2 callers
Function
sample
(iterable: Iterable<T>)
collections/sample.ts:24
↓ 2 callers
Function
sanitizeInput
(input: string)
yaml/unstable_parse.ts:23
↓ 2 callers
Function
sanitizeInput
(input: string)
yaml/parse.ts:36
↓ 2 callers
Function
seedBytesFromUint64
( u64: bigint, bytes: Uint8Array_, )
random/_seed_bytes_from_uint64.ts:12
↓ 2 callers
Function
serialize
(actual: unknown)
testing/_snapshot_utils.ts:30
↓ 2 callers
Function
serializeBareItem
(bareItem: BareItem)
http/unstable_structured_fields.ts:1252
↓ 2 callers
Function
serializeComponentIdentifier
(id: ComponentIdentifier)
http/unstable_message_signatures.ts:589
↓ 2 callers
Function
serializeElement
* Serializes an XML element and its children to a string.
xml/stringify.ts:91
↓ 2 callers
Function
serializeInnerList
(innerList: InnerList)
http/unstable_structured_fields.ts:1243
↓ 2 callers
Function
serveDir
( req: Request, opts: ServeDirOptions = {}, )
http/file_server.ts:653
↓ 2 callers
Method
setAssertionCheck
* If `expect.hasAssertions` called, then through this method to update #state.assertionCheck value. * * @param val Set #state.assertionCheck's v
internal/assertion_state.ts:109
↓ 2 callers
Method
setAssertionTriggered
* If any matchers was called, `#state.assertionTriggered` will be set through this method. * * @param val Set #state.assertionTriggered's value
internal/assertion_state.ts:126
↓ 2 callers
Function
setCookie
(headers: Headers, cookie: Cookie)
http/cookie.ts:300
↓ 2 callers
Function
setNested
( object: NestedMapping, keys: string[], value: unknown, collect = false, )
cli/parse_args.ts:447
↓ 2 callers
Function
setTimer
( callback: (...args: unknown[]) => unknown, delay = 0, args: unknown[], repeat = false, )
testing/time.ts:175
↓ 2 callers
Method
skip
* Registers an individual test case with ignore set to true. Alias of * `.ignore()`.
testing/bdd.ts:580
↓ 2 callers
Function
skipOWS
Skip optional whitespace (SP or HTAB)
http/unstable_structured_fields.ts:537
↓ 2 callers
Function
slidingWindowsTest
( input: Parameters<typeof slidingWindows>, expected: T[][], message?: string, )
collections/sliding_windows_test.ts:6
↓ 2 callers
Function
specify
( encoding: string, spec: EncodingSpecificity, i = -1, )
http/_negotiation/encoding.ts:65
↓ 2 callers
Function
split
(path: string)
fs/expand_glob.ts:62
↓ 2 callers
Function
splitByLast
(value: string, separator: string)
http/unstable_signed_cookie.ts:7
↓ 2 callers
Function
sprintf
(format: string, ...args: unknown[])
fmt/printf.ts:982
↓ 2 callers
Method
storeMappingPair
( result: Record<string, unknown>, overridableKeys: Set<string>, keyTag: string | null, keyNod
yaml/_loader_state.ts:461
↓ 2 callers
Function
string
(value: string)
http/unstable_structured_fields.ts:199
↓ 2 callers
Function
stringify
( obj: Record<string, unknown>, options?: StringifyOptions, )
toml/stringify.ts:290
↓ 2 callers
Function
stringify
( data: unknown, options: StringifyOptions = {}, )
yaml/stringify.ts:109
↓ 2 callers
Function
stubIntlFunctions
(defaultLocale: string)
text/_test_util.ts:11
↓ 2 callers
Function
surround
( left: string, parser: ParserComponent<T>, right: string, )
toml/_parser.ts:374
↓ 2 callers
Function
swap
Swaps the values at two indexes in an array.
data_structures/binary_heap.ts:7
↓ 2 callers
Function
test
(str: string, formats?: Format[])
front_matter/test.ts:68
↓ 2 callers
Function
testTransformStream
( transform: TransformStream<T, U>, inputs: Iterable<T> | AsyncIterable<T>, outputs: Iterable<U> | Async
streams/_test_utils.ts:11
↓ 2 callers
Function
testUnicode
(expected: string, input: string)
text/unstable_reverse_test.ts:9
↓ 2 callers
Function
throwIfNotDirectory
(fileInfo: Deno.FileInfo)
fs/ensure_dir.ts:100
↓ 2 callers
Function
throwSnapshotMismatch
Throws a diff-based assertion error comparing two snapshot strings.
expect/_matchers.ts:1110
↓ 2 callers
Function
throwUnlessNotFound
(error: unknown)
fs/expand_glob.ts:79
↓ 2 callers
Method
tickAsync
* Runs all pending microtasks then adds the specified number of milliseconds to the fake time. * This will call any functions waiting to be called
testing/time.ts:685
↓ 2 callers
Method
toArray
* Returns a fresh array of segment counts ordered from oldest to newest * (matching iteration order). The returned array is owned by the caller;
data_structures/unstable_rolling_counter.ts:451
↓ 2 callers
Method
toBeGreaterThan
* Asserts that the value is greater than the specified number. * * @example Usage * ```ts * import { expect } from "@std/expect"; *
expect/_types.ts:248
↓ 2 callers
Method
toBeNull
* Asserts that the value is null. * * @example Usage * ```ts * import { expect } from "@std/expect"; * * expect(null).toBeNull();
expect/_types.ts:339
↓ 2 callers
Method
toBeUndefined
* Asserts that the value is undefined. * * @example Usage * ```ts * import { expect } from "@std/expect"; * * expect(undefined).toBe
expect/_types.ts:375
↓ 2 callers
Function
toCamelCase
(input: string)
text/to_camel_case.ts:20
↓ 2 callers
Method
toContain
* Asserts that the value contains the specified value (shallow equality). * * @example Usage * ```ts * import { expect } from "@std/expect
expect/_types.ts:432
↓ 2 callers
Method
toContainEqual
* Asserts that the value contains the specified value (deep equality). * * @example Usage * ```ts * import { expect } from "@std/expect";
expect/_types.ts:411
↓ 2 callers
Function
toDirEntry
(s: import("node:fs").Dirent)
fs/_to_dir_entry.ts:5
↓ 2 callers
Method
toHaveBeenCalledWith
* Asserts that the function was called with the specified arguments. * * @example Usage * ```ts * import { expect, fn } from "@std/expect"
expect/_types.ts:486
↓ 2 callers
Method
toHaveLength
* Asserts that the value has the specified length. * * @example Usage * ```ts * import { expect } from "@std/expect"; * * expect([1,
expect/_types.ts:561
↓ 2 callers
Method
toHaveProperty
* Asserts that the value has the specified property with an optional value. * * @example Usage * ```ts * import { expect } from "@std/expe
expect/_types.ts:619
↓ 2 callers
Method
toMatchSnapshot
* Asserts that the value matches the most recent snapshot. If no snapshot * exists, one will be created when running in update mode (`-- --update`)
expect/_types.ts:729
↓ 2 callers
Function
toPascalCase
(input: string)
text/to_pascal_case.ts:20
↓ 2 callers
Method
toStrictEqual
* Asserts that the value is strictly equal to the specified value. * * @example Usage * ```ts * import { expect } from "@std/expect"; *
expect/_types.ts:883
↓ 2 callers
Method
toString
()
expect/_custom_equality_tester_test.ts:14
↓ 2 callers
Function
toTitleCase
(input: string, options?: TitleCaseOptions)
text/unstable_to_title_case.ts:64
↓ 2 callers
Function
toTransformStream
( transformer: (src: ReadableStream<I>) => Iterable<O> | AsyncIterable<O>, writableStrategy?: QueuingStrat
streams/to_transform_stream.ts:74
↓ 2 callers
Function
toUint8Array
(data: unknown)
crypto/crypto.ts:153
↓ 2 callers
Method
todo
* Register a test case that is not yet implemented. Alias of `.ignore()`.
testing/unstable_bdd.ts:95
↓ 2 callers
Function
token
(value: string)
http/unstable_structured_fields.ts:220
↓ 2 callers
Function
tokenize
(string: string, wordDiff = false)
internal/diff_str.ts:57
↓ 2 callers
Function
trimEndBy
( str: string, pattern: TrimPattern, )
text/unstable_trim_by.ts:138
↓ 2 callers
Function
trimStartBy
( str: string, pattern: TrimPattern, )
text/unstable_trim_by.ts:95
↓ 2 callers
Function
trimUntilDone
(str: string, regex: RegExp)
text/unstable_trim_by.ts:145
↓ 2 callers
Method
truncateSync
* Synchronously truncates (or extends) the file to reach the specified `len`. * If `len` is not specified, then the entire file contents are trunca
fs/unstable_types.ts:502
↓ 2 callers
Function
tryRoute
* Try a single route as a candidate. Updates `state` in place when the * route matches and has a lower insertion index than the current best.
http/unstable_route.ts:349
↓ 2 callers
Function
typeByExtension
(extension: string)
media_types/type_by_extension.ts:29
↓ 2 callers
Function
unescape
(string: string)
internal/diff_str.ts:24
↓ 2 callers
Function
unescapeGlobSegment
(segment: string)
fs/expand_glob.ts:540
↓ 2 callers
Function
unicodeWidth
(str: string)
cli/unicode_width.ts:77
↓ 2 callers
Function
union
(...arrays: Iterable<T>[])
collections/union.ts:26
↓ 2 callers
Function
unknownFn
(arg: string, k?: string, v?: unknown)
cli/parse_args_test.ts:693
↓ 2 callers
Function
unquoteArgument
Resolve a directive argument that may be either a token or a quoted-string * (RFC 9111 §5.2). When the value is a quoted-string, surrounding double
http/unstable_cache_control.ts:158
↓ 2 callers
Function
unzip
(pairs: readonly [T, U][])
collections/unzip.ts:34
↓ 2 callers
Method
updateSnapshot
Stores an updated snapshot value. Written to disk on teardown.
expect/_snapshot_state.ts:412
↓ 2 callers
Function
uuidToBytes
(uuid: string)
uuid/_common.ts:47
↓ 2 callers
Function
validateKey
(key: string)
http/unstable_structured_fields.ts:1418
↓ 2 callers
Method
width
()
cli/_tools/generate_data.ts:180
↓ 2 callers
Function
windowsMatch
(glob: string, path: string, options?: GlobOptions)
path/glob_to_regexp_test.ts:15
↓ 2 callers
Function
writeAllSync
(writer: WriterSync, data: Uint8Array)
io/write_all.ts:62
↓ 2 callers
Function
yellow
(str: string)
fmt/colors.ts:349
↓ 1 callers
Method
#arrayDeclaration
(keys: string[], value: unknown[])
toml/stringify.ts:187
↓ 1 callers
Method
#boolDeclaration
(keys: string[], value: boolean)
toml/stringify.ts:206
↓ 1 callers
Method
#captureAttributeValue
* Batch-scan attribute value using indexOf for the closing quote. * Returns true if complete and ready for emission. * Validates that '<' is not
xml/_tokenizer.ts:1228
↓ 1 callers
Method
#captureCDATA
* Batch-scan CDATA using indexOf("]]>"). Returns true if complete and emitted. * When incomplete, consumes safe content (excluding trailing ] or ]]
xml/_tokenizer.ts:1144
↓ 1 callers
Method
#captureComment
* Batch-scan comment using indexOf("-->"). Returns true if complete and emitted. * When incomplete, consumes safe content (excluding trailing -) fo
xml/_tokenizer.ts:923
↓ 1 callers
Method
#captureNameChars
* Capture an XML name (element or attribute name) in a tight loop. * * Assumes the first character has already been validated as NameStartChar.
xml/_tokenizer.ts:879
↓ 1 callers
Method
#capturePI
* Batch-scan PI using indexOf("?>"). Returns true if complete and emitted. * When incomplete, consumes safe content (excluding trailing ?) for char
xml/_tokenizer.ts:1058
↓ 1 callers
Method
#captureText
* Capture text content in a tight loop until '<' is found. * Returns true if '<' was found, false if end of buffer reached. * * The "]]>" che
xml/_tokenizer.ts:799
↓ 1 callers
Method
#closeGapFromBack
Close the gap at `i` by shifting elements after it one slot toward the front.
data_structures/deque.ts:834
↓ 1 callers
Method
#closeGapFromFront
Close the gap at `i` by shifting elements before it one slot toward the back.
data_structures/deque.ts:823
↓ 1 callers
Method
#createFormatterObject
()
cli/unstable_progress_bar.ts:248
↓ 1 callers
Method
#createInternal
* Allocate a new {@linkcode IndexedHeap} from inside the class, bypassing * the public constructor's conditional rest-tuple constraint. Used by
data_structures/unstable_indexed_heap.ts:455
↓ 1 callers
Method
#createLock
()
http/unstable_formdata_decoder_stream.ts:254
← previous
next →
801–900 of 2,890, ranked by callers