MCPcopy Create free account

hub / github.com/denoland/std / functions

Functions2,890 in github.com/denoland/std

↓ 459 callersFunctionassertEquals
( actual: T, expected: T, msg?: string, )
assert/equals.ts:46
↓ 246 callersMethodpush
* Add one or more values to the binary heap, returning the new length of the * heap. * * The complexity of this operation is O(1) on average
data_structures/binary_heap.ts:342
↓ 220 callersFunctionassertThrows
( fn: () => unknown, errorClassOrMsg?: // deno-lint-ignore no-explicit-any | (abstract new (...arg
assert/throws.ts:59
↓ 212 callersMethodslice
* Get sliced string * @param start - start position relative from current position * @param end - end position relative from current position
toml/_parser.ts:74
↓ 130 callersMethodset
Stores a value in the cache under the given key.
cache/memoize.ts:17
↓ 126 callersFunctionassert
(expr: unknown, msg = "")
assert/assert.ts:20
↓ 121 callersMethodget
Returns the cached value associated with the given key, if present.
cache/memoize.ts:15
↓ 107 callersMethodincludes
* Check whether the deque contains a value, using * {@link https://tc39.es/ecma262/#sec-samevaluezero | SameValueZero} * comparison (like {@link
data_structures/deque.ts:512
↓ 87 callersFunctionassertRejects
( fn: () => PromiseLike<unknown>, errorClassOrMsg?: // deno-lint-ignore no-explicit-any | (abstrac
assert/rejects.ts:56
↓ 77 callersMethodstep
Mutates `pcg` by advancing `pcg.state`.
random/_pcg32.ts:124
↓ 74 callersMethodhas
Checks whether a value for the given key exists in the cache.
cache/memoize.ts:13
↓ 71 callersMethodtoString
* Converts the current instance to a string. * * @example Usage * ```ts ignore * import { UserAgent } from "@std/http/user-agent"; *
http/user_agent.ts:1184
↓ 69 callersMethodstartsWith
(searchString: string)
toml/_parser.ts:126
↓ 65 callersMethodfrom
(args: any[])
random/_test_utils.ts:99
↓ 61 callersFunctionmapError
(e: E)
fs/_map_error.ts:26
↓ 58 callersMethodkeys
* Returns an iterator of all distinct keys in the map, in insertion order. * * Mutating the map during iteration is not supported and may skip o
data_structures/unstable_multimap.ts:560
↓ 54 callersMethodparse
()
jsonc/parse.ts:72
↓ 51 callersMethodentries
()
cli/_tools/generate_data.ts:173
↓ 47 callersFunctionexpect
( value: unknown, customMessage?: string, )
expect/expect.ts:156
↓ 47 callersMethodstringify
(value: unknown)
yaml/_dumper_state.ts:818
↓ 46 callersMethodread
Reads up to `p.byteLength` bytes into `p`. It resolves to the number of * bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error * en
io/types.ts:32
↓ 45 callersFunctiongetNodeFs
()
fs/_utils.ts:13
↓ 44 callersFunctioncode
* Builds color code * @param open * @param close
fmt/colors.ts:127
↓ 44 callersMethodmatch
(regExp: RegExp)
toml/_parser.ts:130
↓ 44 callersFunctionrun
* Applies color and background based on color code and its associated text * @param str The text to apply color settings to * @param code The color
fmt/colors.ts:140
↓ 42 callersMethodfloor
* Finds the highest (rightmost) value in the binary search tree which is * less than or equal to the given value, or null if the given value * i
data_structures/unstable_binary_search_tree.ts:325
↓ 42 callersFunctionresolve
(...pathSegments: string[])
path/resolve.ts:28
↓ 39 callersMethoddelete
Removes the value associated with the given key from the cache.
cache/memoize.ts:19
↓ 39 callersFunctionjoin
(path: string | URL, ...paths: string[])
path/join.ts:29
↓ 37 callersMethodfrom
* Creates a {@link CborMapEncoderStream} instance from an iterable of * {@link CborMapStreamInput} chunks. * * @example Usage * ```ts *
cbor/map_encoder_stream.ts:103
↓ 36 callersMethodmin
* Retrieve the lowest (left most) value in the binary search tree, or null if * the tree is empty. * * The complexity of this operation depen
data_structures/binary_search_tree.ts:512
↓ 36 callersMethodnow
* The number of milliseconds elapsed since the epoch (January 1, 1970 00:00:00 UTC) for the fake time. * * @example Usage * ```ts * import
testing/time.ts:477
↓ 34 callersFunctionassertStrictEquals
( actual: unknown, expected: T, msg?: string, )
assert/strict_equals.ts:32
↓ 34 callersMethodforEach
* Executes a provided function once for each individual value in the map, * in insertion order of keys and values. * * Within a bucket, the s
data_structures/unstable_multimap.ts:401
↓ 30 callersMethodadd
* Add an async iterable to the stream. * * @param iterable The async iterable to add. * * @example Usage * ```ts * import { MuxAsync
async/mux_async_iterator.ts:74
↓ 30 callersMethodclose
Closes the resource, "freeing" the backing file/resource.
io/types.ts:104
↓ 29 callersFunctionsuccess
(body: T)
toml/_parser.ts:143
↓ 28 callersFunctionfailure
()
toml/_parser.ts:146
↓ 28 callersMethodnext
()
async/tee.ts:44
↓ 28 callersFunctionstub
( self: Self, property: keyof Self, func?: (this: Self, ...args: Args) => Return, )
testing/mock.ts:1055
↓ 27 callersMethodfind
* Return the first element matching the predicate, scanning from front to * back, without removing it. Returns `undefined` if no match is found.
data_structures/deque.ts:390
↓ 25 callersFunctionconcat
(buffers: readonly Uint8Array[])
bytes/concat.ts:24
↓ 25 callersMethodnext
* Move position to next
toml/_parser.ts:81
↓ 25 callersMethodvalues
* Returns an iterator of all individual values across all keys, in insertion * order. * * Mutating the map during iteration is not supported
data_structures/unstable_multimap.ts:588
↓ 24 callersMethodremove
* Remove a value from the red-black tree if it exists in the tree. * * The complexity of this operation is on average and at worst O(log n), whe
data_structures/red_black_tree.ts:393
↓ 24 callersMethodstat
* Resolves to a {@linkcode FileInfo} for the file. * * @example Usage * ```ts ignore * import { assert } from "@std/assert"; * import {
fs/unstable_types.ts:370
↓ 24 callersMethodtoThrow
* Asserts that the function throws an error. * * @example Usage * ```ts * import { expect } from "@std/expect"; * * const fn = () =>
expect/_types.ts:908
↓ 23 callersMethodclear
Clears the debounce timeout and omits calling the debounced function.
async/debounce.ts:12
↓ 23 callersMethodpop
* Remove the greatest value from the binary heap and return it, or return * undefined if the heap is empty. * * @example Removing the greates
data_structures/binary_heap.ts:298
↓ 22 callersMethodabort
()
async/lazy.ts:138
↓ 22 callersFunctionassertEquals
( actual: T, expected: T, options?: EqualOptions, )
expect/_assert_equals.ts:27
↓ 22 callersMethodmax
* Retrieve the highest (right most) value in the binary search tree, or null * if the tree is empty. * * The complexity of this operation dep
data_structures/binary_search_tree.ts:535
↓ 21 callersMethod#createError
(message: string)
yaml/_loader_state.ts:275
↓ 20 callersFunctiontoPathString
( pathUrl: string | URL, )
fs/_to_path_string.ts:13
↓ 19 callersFunctionequal
(c: unknown, d: unknown, options?: EqualOptions)
expect/_equal.ts:42
↓ 18 callersFunctiondecode
( buffer: Uint8Array_, i: number, o: number, alphabet: Uint8Array, )
encoding/_common16.ts:46
↓ 18 callersFunctiondirname
(path: string | URL)
path/dirname.ts:31
↓ 18 callersFunctionencode
( buffer: Uint8Array_, i: number, o: number, alphabet: Uint8Array, )
encoding/_common16.ts:32
↓ 18 callersFunctionparse
(value: string)
semver/parse.ts:29
↓ 18 callersMethodpeek
(offset = 0)
yaml/_loader_state.ts:197
↓ 18 callersMethodskipWhitespaces
()
toml/_parser.ts:85
↓ 17 callersMethodat
* Return the element at the given index (0-based from front). Negative * indices count from the back (`-1` is the last element). Returns `undefined
data_structures/deque.ts:479
↓ 17 callersFunctioncompare
(version1: SemVer, version2: SemVer)
semver/compare.ts:35
↓ 17 callersMethodnext
()
yaml/_loader_state.ts:201
↓ 17 callersMethodstatSync
* Synchronously returns a {@linkcode FileInfo} for the file. * * @example Usage * ```ts ignore * import { assert } from "@std/assert";
fs/unstable_types.ts:383
↓ 16 callersMethodcancel
()
tar/untar_stream.ts:340
↓ 16 callersFunctiondelay
(ms: number, options: DelayOptions = {})
async/delay.ts:51
↓ 16 callersFunctionencodeCbor
(value: CborType)
cbor/encode_cbor.ts:38
↓ 16 callersFunctionfromFileUrl
(url: string | URL)
path/from_file_url.ts:28
↓ 16 callersMethodparse
(input: string)
csv/parse.ts:207
↓ 16 callersFunctionspy
( funcOrConstOrSelf?: | ((this: Self, ...args: Args) => Return) | (new (...args: Args) => Self)
testing/mock.ts:943
↓ 15 callersFunctionassertPath
(path?: string)
path/_common/assert_path.ts:4
↓ 15 callersFunctiondetach
( buffer: Uint8Array_, maxSize: number, )
encoding/_common_detach.ts:6
↓ 14 callersFunctionassertSpyCall
( spy: SpyLike<Self, Args, Return>, callIndex: number, expected?: ExpectedSpyCall<Self, Args, Return>, )
testing/mock.ts:1259
↓ 14 callersFunctionpredicate
(object)
yaml/_type/timestamp.ts:95
↓ 13 callersFunctionassertInstanceOf
( actual: unknown, expectedType: T, msg = "", )
assert/instance_of.ts:28
↓ 13 callersMethodfrom
( collection: ArrayLike<T> | Iterable<T> | Deque<T>, options?: { map?: (value: T, index: number)
data_structures/deque.ts:672
↓ 13 callersFunctionstatSync
(path: string | URL)
fs/unstable_stat.ts:59
↓ 12 callersFunctionassertFalse
(expr: unknown, msg = "")
assert/false.ts:23
↓ 12 callersFunctionassertSpyCalls
( spy: SpyLike<Self, Args, Return>, expectedCalls: number, )
testing/mock.ts:1174
↓ 12 callersMethodchar
* Get current character * @param index - relative index from current position
toml/_parser.ts:65
↓ 12 callersMethodeof
* Position reached EOF or not
toml/_parser.ts:118
↓ 12 callersFunctionfn
(...stubs: Function[])
expect/fn.ts:53
↓ 12 callersFunctionisEof
Check if at end of input
http/unstable_structured_fields.ts:522
↓ 12 callersFunctionrandom
(start: number, end: number)
cbor/_common_test.ts:3
↓ 12 callersFunctionstat
(path: string | URL)
fs/unstable_stat.ts:27
↓ 12 callersMethodtoString
()
testing/_test_utils.ts:14
↓ 11 callersMethod#error
(message: string)
xml/_tokenizer.ts:398
↓ 11 callersMethod#read
( bytes: number, expectMore: boolean, )
cbor/sequence_decoder_stream.ts:145
↓ 11 callersFunctionassertNotEquals
(actual: T, expected: T, msg?: string)
assert/not_equals.ts:33
↓ 11 callersFunctionerror
(message: string)
xml/_parse_sync.ts:171
↓ 11 callersFunctionformat
(pathObject: Partial<ParsedPath>)
path/format.ts:28
↓ 11 callersFunctiongetMockCalls
(f: any)
expect/_mock_util.ts:15
↓ 11 callersFunctionparsePrerelease
(prerelease: string)
semver/_shared.ts:173
↓ 11 callersFunctionpeek
Peek current character
http/unstable_structured_fields.ts:527
↓ 11 callersMethodtoEqual
* Asserts that the value is equal to the specified value (deep equality). * * @example Usage * ```ts * import { expect } from "@std/expect
expect/_types.ts:448
↓ 11 callersMethodwrite
Writes `p.byteLength` bytes from `p` to the underlying data stream. It * resolves to the number of bytes written from `p` (`0` <= `n` <= * `p.by
io/types.ts:79
↓ 10 callersFunctionarrayToNumber
( buffer: ArrayBufferLike & { BYTES_PER_ELEMENT?: never }, isInteger: boolean, )
cbor/_common.ts:20
↓ 10 callersFunctionassert
( condition: boolean, message: string, document: { location: Location }, )
_tools/check_docs.ts:51
↓ 10 callersFunctionassertMatch
( actual: string, expected: RegExp, msg?: string, )
assert/match.ts:21
next →1–100 of 2,890, ranked by callers