Skip to main content
Home

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
2 weeks ago (1.0.7)

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

Note: this module is for internal use only and should not be used directly.

import { diff, diffStr, buildMessage } from "@std/internal";
import { assertEquals } from "@std/assert";

const a = [1, 2, 3];
const b = [1, 2, 4];

assertEquals(diff(a, b), [
  { type: "common", value: 1 },
  { type: "common", value: 2 },
  { type: "removed", value: 3 },
  { type: "added", value: 4 },
]);

const diffResult = diffStr("Hello, world!", "Hello, world");

console.log(buildMessage(diffResult));
// [
//   "",
//   "",
//   "    [Diff] Actual / Expected",
//   "",
//   "",
//   "-   Hello, world!",
//   "+   Hello, world",
//   "",
// ]
Built and signed on
GitHub Actions

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.

Add Package

deno add jsr:@std/internal

Import symbol

import * as internal from "@std/internal";
or

Import directly with a jsr specifier

import * as internal from "jsr:@std/internal";

Add Package

pnpm i jsr:@std/internal
or (using pnpm 10.8 or older)
pnpm dlx jsr add @std/internal

Import symbol

import * as internal from "@std/internal";

Add Package

yarn add jsr:@std/internal
or (using Yarn 4.8 or older)
yarn dlx jsr add @std/internal

Import symbol

import * as internal from "@std/internal";

Add Package

npx jsr add @std/internal

Import symbol

import * as internal from "@std/internal";

Add Package

bunx jsr add @std/internal

Import symbol

import * as internal from "@std/internal";