Skip to main content

INTERNAL: The internal package for @std. Do not use this directly.

This package works with Deno, BrowsersIt is unknown whether this package works with Cloudflare Workers, Node.js, Bun
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score
94%
Published
4 weeks ago (1.0.5)

default

Internal utilities for the public API of the Deno Standard Library.

f
assertFp

Asserts that the value is a FarthestPoint. If not, an error is thrown.

f
backTrace

Creates an array of backtraced differences.

f
bgGreen

Sets the background color of text to be printed to green.

f
bgRed

Sets the background color of text to be printed to red.

f
bold

Sets the style of text to be printed to bold.

f
brightBlack

Sets the color of text to be printed to bright-black.

f
buildMessage

Builds a message based on the provided diff result.

I
BuildMessageOptions

Options for buildMessage.

f
createColor

Colors the output of assertion diffs.

f
createCommon

Creates an array of common elements between two arrays.

f
createDetails

Create details by filtering relevant word-diff for current line and merge "space-diff" if surrounded by word-diff for cleaner displays.

f
createFp

Creates a FarthestPoint.

f
createSign

Prefixes + or - in diff output.

f
diff

Renders the differences between the actual and expected values.

I
DiffResult

Represents the result of a diff operation.

f
diffStr

Renders the differences between the actual and expected strings. Partially inspired from https://github.com/kpdecker/jsdiff.

T
DiffType

Ways that lines in a diff can be different.

I
FarthestPoint

Represents the farthest point in the diff algorithm.

f
format

Converts the input into a string. Objects, Sets and Maps are sorted so as to make tests less flaky.

f
getAssertionState

return an instance of AssertionState

f
gray

Sets the color of text to be printed to gray.

f
green

Sets the color of text to be printed to green.

f
red

Sets the color of text to be printed to red.

f
stripAnsiCode

Remove ANSI escape codes from the string.

f
tokenize

Tokenizes a string into an array of tokens.

f
unescape

Unescape invisible characters.

f
white

Sets the color of text to be printed to white.

f
yellow

Sets the color of text to be printed to yellow.

f
buildMessage

Builds a message based on the provided diff result.

I
BuildMessageOptions

Options for buildMessage.

f
createColor

Colors the output of assertion diffs.

f
createSign

Prefixes + or - in diff output.

f
assertFp

Asserts that the value is a FarthestPoint. If not, an error is thrown.

f
backTrace

Creates an array of backtraced differences.

f
createCommon

Creates an array of common elements between two arrays.

f
createFp

Creates a FarthestPoint.

f
diff

Renders the differences between the actual and expected values.

I
FarthestPoint

Represents the farthest point in the diff algorithm.

f
createDetails

Create details by filtering relevant word-diff for current line and merge "space-diff" if surrounded by word-diff for cleaner displays.

f
diffStr

Renders the differences between the actual and expected strings. Partially inspired from https://github.com/kpdecker/jsdiff.

f
tokenize

Tokenizes a string into an array of tokens.

f
unescape

Unescape invisible characters.

f
format

Converts the input into a string. Objects, Sets and Maps are sorted so as to make tests less flaky.

f
bgGreen

Sets the background color of text to be printed to green.

f
bgRed

Sets the background color of text to be printed to red.

f
bold

Sets the style of text to be printed to bold.

f
brightBlack

Sets the color of text to be printed to bright-black.

f
gray

Sets the color of text to be printed to gray.

f
green

Sets the color of text to be printed to green.

f
red

Sets the color of text to be printed to red.

f
stripAnsiCode

Remove ANSI escape codes from the string.

f
white

Sets the color of text to be printed to white.

f
yellow

Sets the color of text to be printed to yellow.

I
DiffResult

Represents the result of a diff operation.

T
DiffType

Ways that lines in a diff can be different.