Skip to main content
Home

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

Works with
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 Score100%
Downloads2/wk
Published4 months ago (1.0.12)

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

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

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";