Skip to main content
Home

@std/internal@1.0.12
Built and signed on GitHub Actions

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
100%
Published
3 months ago (1.0.12)

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.

T
ChangedDiffResult

Represents the result of a changed diff operation.

T
CommonDiffResult

Represents the result of a common diff operation.

f
consolidateCommon

Consolidates a sequence of common diff results by truncating unchanged lines.

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.

v
DIFF_CONTEXT_LENGTH

The environment variable used for setting diff context length.

T
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
getTruncationContextLengthFromEnv

Get the truncation context length from the DIFF_CONTEXT_LENGTH environment variable.

f
gray

Sets the color of text to be printed to gray.

f
green

Sets the color of text to be printed to green.

T
InspectFn

An inspect function conforming to the shape of Deno.inspect and node:util's inspect

v
isWindows

Whether the current platform is Windows

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
truncateDiff

Truncates a diff result by consolidating unchanged lines.

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.

T
InspectFn

An inspect function conforming to the shape of Deno.inspect and node:util's inspect

v
isWindows

Whether the current platform is Windows

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.

f
consolidateCommon

Consolidates a sequence of common diff results by truncating unchanged lines.

v
DIFF_CONTEXT_LENGTH

The environment variable used for setting diff context length.

f
getTruncationContextLengthFromEnv

Get the truncation context length from the DIFF_CONTEXT_LENGTH environment variable.

f
truncateDiff

Truncates a diff result by consolidating unchanged lines.

T
ChangedDiffResult

Represents the result of a changed diff operation.

T
CommonDiffResult

Represents the result of a common diff operation.

T
DiffResult

Represents the result of a diff operation.

T
DiffType

Ways that lines in a diff can be different.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.